Questions tagged [react-admin]

A frontend Framework for building admin applications running in the browser on top of REST/GraphQL APIs, using ES6, React and Material Design. Previously named admin-on-rest. Open sourced and maintained by marmelab.

0
votes
0answers
5 views

How to change TextInput values using FormDataConsumer

I'm having some trouble trying to dinamically change a TextInput value based on another input using FormDataConsumer. I have a ReferenceInput that set an AutocompleteInput with some options like ...
1
vote
0answers
7 views

Get ReferenceManyField Count?

How do you get to display a count of a "ReferenceManyField" component? Here is the thing, I am listing organizations and I would like to get each of them their users counts. Fetch organizations: ...
0
votes
0answers
13 views

How can I use a fork of react-admin (or one of its packages) in my production environment?

I need a few changes to the ra-core package of the react-admin monorepo on my productive environment. Can I tell a lerna published module to use my own published module as a submodule instead of it'...
0
votes
1answer
20 views

undefined id at edit page in react admin

I'm using react admin for a project, I need to add descriptions to users: admins are allowed to add/edit to any user and only user themselves can edit their own description. I am able to show the edit ...
2
votes
0answers
20 views

Filter changes the focus of TextInput after few words and does not allow to enter long words

While using Filter in a List react admin does not allow you to type a long text and changes the focus from the TextInput after typing some characters. Below sample code from react-native docs can be ...
0
votes
0answers
42 views

Resource names are shown instead of labels

Suddenly my react-admin started to act weird. It shows resource names instead of labels: My code hasn't changed, all the labels are there. E.g.: <Resource name="ads" options={{ ...
0
votes
1answer
18 views

Trying to emulate a blank page while using react-admin, but z-index is not overlaying div over menu/sidebar

I am using react-admin which has a sidebar and menubar. For one of the routes I added, I want it to display a pure blank white screen, no menu bar or sidebar, pure blank. I need the page to be blank ...
1
vote
1answer
24 views

How to organise a Show layout in React Admin using a Material UI Grid

I've created a number of Show views in a new React-Admin project. Rather than have the fields just form a single column I would like to use Material UI's Grid component to arrange them into a more ...
0
votes
0answers
12 views

AutocompleteInput shows current value as first suggestion

On the demo, click on any order in Pending orders, then type something on the Customer field. You get the correct suggestions, so select one. Now go back and start typing another name. The input shows ...
0
votes
0answers
34 views

Is it possible to have nested resources?

I would like to know if its possible in react-admin to use nested resources. Or in other words to display subresource within a resource in menu. Is there any way to accomplish this? I have this ...
0
votes
1answer
32 views

How to paginate react-admin lists when the total is unknown?

Summary: I can't get a total number of records from my GraphQL endpoint. I only know if I have reached the end of my GraphQL records list when I am parsing the response from the endpoint. How can I ...
0
votes
0answers
51 views

Error : Unable to retrieve API Documentation

I am a beginner I have to solve a problem on an application in progress. The back office was working but today it does not work anymore. I have control over the doc Api platform admin, everything ...
0
votes
2answers
52 views

React-admin: How to Pass more parameters to a dataProvider for type GET_LIST

I want to pass one custom parameter to the Admin's dataProvider for type 'GET_LIST'. I have something like this in App.js: <Admin dataProvider={dataProvider}> <Resource name="posts" ...
0
votes
1answer
25 views

Export CSV button with tabulation as delimiter

I'd like my react admin export button to export tab separated csv file, so i don't need to convert the comma separated file, by doing : Data=>Convert=>Select Comma. This is the code i use (From React-...
0
votes
1answer
21 views

Transition between posts not refund to the list of all posts

i use React-admin. And I should add on the page "Edit", for example, products, two buttons. That on clicking the corresponding button it was possible to pass to the next or previous products not ...
0
votes
0answers
33 views

Text not displaying correctly in react-admin interface

Edit: Solved ------ Some texts are not redering properly in "react admin" web interface. Version: 2.8.5. Default icons like "Edit" or "Clone" or even the links to my resources are rendered wrong. ...
-1
votes
1answer
19 views

How to manage sortable iterator state in react-admin?

I'm writing a custom iterator , which supports drag and drop to reorder the list. I am not sure how i can update the order of admin/resources/xxx/data. I have tried to set component state from props, ...
0
votes
0answers
7 views

React warning when using ReferenceInput with RadioButtonGroupInput

When using the RadioButtonGroupInput inside ReferenceInput I get some warnings from React: React does not recognize the setFilter prop on a DOM element React does not recognize the setPagination prop ...
-1
votes
0answers
26 views

Displaying Menu List depending on the user permissions

I am getting the same menu list for all users when I log in. But, I need to display different menu item for different users based on their roles using react-admin. const cardActionStyle = { zIndex: 2,...
0
votes
0answers
15 views

List: permanent filter mapped to a state value, but the list doesn't get filtered with the new state value

I'm using a value from the state as a permanent filter on a list. When I change the value in the state, everything seems to work correctly: the list gets re-rendered, the value coming into the list ...
2
votes
0answers
30 views

React-admin: Missing headers object in data provider

I am trying to create a custom data provider for my API. I am able to login and GET_LIST but unable to process the received data. I have adapted the required output format for the API responses and ...
0
votes
0answers
15 views

React create custom action in list

I got a problem with react I would like to create a custom actions button on top of my list to import a CSV file. I looked at the doc but it didn't help me. Where the button should be How can i do ? ...
0
votes
1answer
45 views

Set “record” property to response data from API call in React/react-admin

In my react-admin app there is a Create component. I read that one can provide the record property to initialize the Create component like in the following. const MyRecord = { year: 2000, name: "...
0
votes
2answers
32 views

How do I change the size of an image in an ImageField?

When I change the image width and height using styles only the column width changes. The image size is not affected. Any ideas? With no styles With styles Repro CodeSandbox (https://codesandbox.io/...
0
votes
0answers
12 views

How do I use parse and format value translation props with an ArrayInput

I've tested the same callbacks with a TextInput and they work. When I add them to an ArrayInput they don't seem to be called (I've tried it on child components too without any luck). In this code ...
1
vote
0answers
37 views

ReferenceArrayInput inside FormDataConsumer does not provide data back

I have this code: <ReferenceInput label="Tipus" source="type" reference="categories" validate={ required() } > <AutocompleteInput optionText="name" /> ...
1
vote
0answers
30 views

Use <ReferenceInput /> data source for multiple inputs

So I have a case where we need to select a total of 8 fonts (a primary and a secondary font in four weights each), and since these are named fields, they need to be individual input fields, and each ...
0
votes
1answer
39 views

Fill Create form with default values from API call in react-admin

I'm still quite unexperienced with React and react-admin. I searched a lot of resources but couldn't find any valuable hints. My use case is the following: Status Quo Here is an example of one of my ...
0
votes
1answer
23 views

FormDataConsumer used with ReferenceArrayInput is not working in react-admin

I want to use FormDataConsumer to be able to get an array depending on another array: <ReferenceInput label="Tipus" source="type" reference="categories" validate={ required() } >...
0
votes
1answer
18 views

How to correctly add the Aside component to create a modal style button on the right side of my show page?

I am building a custom show page for an individual customer. Within this page I need a button that allows me to edit their points value they have. I am wanting to use the aside component that is built ...
0
votes
1answer
22 views

Initializing a form with response data from an API in react-admin/react

In my react-admin app there is a form FooCreate. When opening this form I'd like to populate the default values for the form elements with data retrieved from an external API. I have read that ...
0
votes
0answers
23 views

How to override the delete button resource in React Admin

I am trying to override the default resource of the delete button and I would like to avoid re-writting the whole Delete button, I want to know if it is possible to only give a prop to Component I ...
0
votes
0answers
27 views

react-admin: Do you need to install redux to your application if you are embedding react-admin inside a non-redux app?

I get the following error after implementing a custom layout for react-admin: Violation: Could not find "store" in the context of "Connect(CustomMenu)". Either wrap the root component in a <...
1
vote
1answer
56 views

How to set and get value of redux-form field

I want to change the value of redux-form Field. I'm building a react-admin app. I checked other questions & answers but nothing able to fix my problem. export class MapInput extends React....
0
votes
0answers
17 views

changing from localStorage to sessionStorage in react-admin does not work

I have my authProvider look like this: import { AUTH_LOGIN, AUTH_LOGOUT, AUTH_GET_PERMISSIONS, AUTH_CHECK } from 'react-admin'; import { stringify } from 'query-string'; export default (type, params)...
0
votes
1answer
49 views

How can I conditionally format the label for a field in react-admin?

I have this code-part in my Edit view: <FormTab label="Jellemzok"> <SelectInput label="Tipus" source="type" choices={[ {id: 0, name: "type1"}, ...
1
vote
0answers
32 views

use next.js with react-admin and create-react-app projects

I'm new in next.js but as I can learn it has own router solution and my question is about use existing app or library with next.js. Is it possible to use next.js with something like https://marmelab....
0
votes
0answers
10 views

How to filter on a string value within an arrayField in react-admin?

I am trying to filter a List based on the presence of a value within an arrayField within a SingleFieldList (using chips). Here is the element from app.js <Resource name='Applicants' ...
0
votes
0answers
42 views

How to get data from custom component?

I have an edit action inside my model file. I am using default react-admin components, unfortunately I had to created my custom component and after the form is submitted no data from this custom ...
0
votes
2answers
36 views

Modify what Text Field is displaying

I have my <ReferenceField> where I get some data to work with. In this case, I get attribute odata.type from my API. I want my <TextField> to display this attribute but I want to slightly ...
0
votes
1answer
70 views

How to handle Server Error in React-admin?

I use GraphQL-Yoga as a backend. The format of the Errors that it returns does not match the documentation. But I need their translation. Is there one place in React -admin where I could catch all the ...
0
votes
1answer
28 views

AuthProvider | I am able switch among roles editing localStorage variables

I developed a panel for my customer to monitor some parameters of their business. Just a few of them are going to be shared with their users. So, I created a panel in React-Admin and then added two ...
0
votes
0answers
32 views

How to add custom action to delete button in toolbar, like to submit button

I can add custom code (where i make manipulations with values) to submit button like this handleSubmitWithRedirect = (redirect = this.props.redirect) => this.props.handleSubmit(values =>...
-1
votes
1answer
15 views

TabbedShowLayout - How to get current selected tab?

How can I get the currently selected tab? Right now I'm getting the current tab by looking at the url (because clicking a tab changes the url) and using regex to see if the url matches the tab that I ...
0
votes
0answers
12 views

when data is null, How to input '-' in 'datefield'?

When I get 'null in My Database(MySQL) in Date column, I want to convert to "-" (string) and insert into react-admin's "datefield" The default 'datefield' prints the Invalid Date character when a ...
2
votes
1answer
93 views

Rewriting the Dataprovider for multiple api requests broke it and now returns the error “Cannot read property 'hasOwnProperty' of undefined”

I am using the react-admin package and it has come to my attention that I needed to rewrite my functioning data provider to merge two different api request results into one array of data before ...
0
votes
0answers
31 views

Using ReferenceArrayInput with a none-flat array

I have a record that looks like so: Item { itemId: 1, categories: [{id: 123, categoryId: 657, itemId: 1}, ...] } (The item is pulled from rest service based on nestjsx/crud, mostly automatic, ...
0
votes
1answer
39 views

How to remove hash from routes in react-admin Framework

I'm using react-admin frontend Framework, and would like to know if there is a way to remove the '#' from routes. I'm using customRoutes properties to provide a collection of routes for our system. &...
1
vote
0answers
85 views

Cannot read property 'hasOwnProperty' of undefined after updating user

I have came across this bug. When I am updating a user I get following error from the interface: Cannot read property 'hasOwnProperty' of undefined The weird thing is, the user updates even when ...
0
votes
1answer
48 views

How to mark options as selected

How can i set selected atribute to options inside of <SelectArrayInput> component? I have not realized how to set selected atribute yet. I have already tried to put there a attribute selected, ...