Questions tagged [admin-on-rest]

Use it for questions about the admin-on-rest admin framework for React.js

Usage questions about the admin-on-rest framework.

501 questions
2
votes
1 answer

Get form data in handleSubmit

Can anyone help me? In the Admin-on-rest framework, I want to write a handleSubmit in SimpleForm. How to get form data in handleSubmit. I have two file input: FileInput and ImageInput and one TextInput. I want to send files and text to the server…
Ali Hesari
  • 1,821
  • 5
  • 25
  • 51
2
votes
1 answer

How to change value of input in Admin on Rest from another component in Create form?

I've reduced this to a very simple case for ease of discussion. I have a simple create form with 1 field and 1 button. I would like the button to set the value of the TextInput to "Hello" without submitting the form. How is this possible in admin…
Andy Cochrane
  • 2,409
  • 1
  • 18
  • 16
2
votes
2 answers

How to update ReferenceManyField after performing an action to one of the ListItems in it

I have a form for editing an Entity that hasMany children. Within this form there's a ReferenceManyField component. This component lists items along with an action button that I have created to let's say “approve” things.
Konstantin Bodnia
  • 1,372
  • 3
  • 20
  • 43
2
votes
1 answer

defaultValue vs placeholder for input fields

Is there a way to use a placeholder for aor input fields? The key difference between the two is that a placeholder won't show up as value when submitted, while a defaultValue will. Is there a notion of placeholder in aoe inputs? If not, why?
nauti
  • 1,396
  • 3
  • 16
  • 37
2
votes
0 answers

How do i combine bulk-actions with actions on a list.

The latest beta has support for bulk actions, I can't understand how to combine them with none bulk, if i add actions prop the bulk action menu does not appear when i select grid rows. Another question related to bulk actions, is it possible to…
twDuke
  • 927
  • 1
  • 8
  • 22
2
votes
1 answer

Add custom column to Datagrid in admin-on-rest

I've created an admin panel in React.js using admin-on-rest. I have a page showing a user list pulling data from an api. I need to add a custom column at the end of each row of that table that will display a progress bar for each user. I'm using a…
Mark
  • 151
  • 1
  • 12
2
votes
0 answers

Admin on rest : How to Edit a JSON Array field of Key Value Pairs

I have a data structure in the REST end point like this : [ {k:"1", v:"ABC"}, {k:"2", v:"XYZ"}, ] How to Display such data in Edit Form such that I can remove and Add New ? If I use SelectArrayInput, then it complains of : Invariant…
Angshuman Agarwal
  • 4,796
  • 7
  • 41
  • 89
2
votes
3 answers

Access current record in admin on rest edit

I need to access the current record in admin on rest Edit. I have an entity and need one of it's properties to do a conditional task. I searched all over the internet and found nothing. export const UserEdit = (props) => (
2
votes
1 answer

Is it possible to have conditional columns in a List/DataGrid in Admin on REST?

If I apply a filter in a List component in Admin on REST, I want to only show the filtered column (TextField) once this specific filter is selected, because the filter is fuzzy and I want to see the different results at a glance. But when no filter…
Thomas Ebert
  • 447
  • 6
  • 15
2
votes
1 answer

Error while displaying a resource list: newRecords.map is not a function

When trying to parse a list of customers, the execution stops when fetching the json-response. I checked my API with Postman and all the data is returned as expected. I use the following code for authenticating with JWT export default (type, params)…
Simon
  • 21
  • 2
2
votes
1 answer

Is there a way to edit 'record' object in List view at the client side in Admin-on-rest?

I'm using Admin-on-rest (1.3.2) and I'm trying to build a custom list view with input text fields and a 'Save' button. By clicking 'Save' I want it to take all the values in the input fields for the current row and send it to the backend. I'm…
2
votes
2 answers

ReferenceManyField uncaught at handleFetch TypeError: payload.data.map is not a function

I try to implement datagrid in tabbed form admin-on-rest I see request to api looks good: /api/v1/projectRounds?_end=25&_order=DESC&_sort=id&_start=0&projectId=505 If I try…
l0ne
  • 51
  • 6
2
votes
1 answer

Admin on rest - How to display a Datagrid withtout a ReferenceField?

In one of my API endpoint I have a resource like that : { "name": "Foo", "anotherField": "anotherValue" "users": [ { "id": "XXX-XXX-XXX-XXX" "firstname": "Clément", "lastname": "Le Biez" } …
2
votes
0 answers

[admin-on-rest]-"Warning" when create with ImageInput

I create SimpleForm with ImageInput. I followed the instructions in the document: https://marmelab.com/admin-on-rest/Inputs.html#imageinput This is my code: export const PostCreate = (props) => ( }…
Hòa Võ
  • 21
  • 3
2
votes
3 answers

Javascript create zip file

I am developing a website using react.js and admin-on-rest. One feature is allowing users to upload a pdf file. I get the file as type FILE and want to get the file from FILE, compress it to zip, and then make it to type FILE. So it should be FILE…
Garrick Klocko
  • 37
  • 1
  • 1
  • 6