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.
1,623
questions
0
votes
0
answers
9
views
How to set input value base on useState in react-admin v4?
I'm moving in react-admin v4.
In my v3 (3.19.11), I have a TextInput with an initialValue equals to state.
By default this state is an empty string and when I complete some other fields, it's updated ...
0
votes
1
answer
21
views
Custom notification with useNotify in react-admin
I'm using react-admin 4.0.3 and i want to replace the default notification for a custom component that i did. I am using the hook useNotify(), there are any way to do this? I can't find a way on the ...
0
votes
0
answers
12
views
v3: how to trigger menu reload
In a component, I show a list of subscribable items. Every item can be subscribed by clicking on a SubscribeButton element. The subscribed items are also listed in the left global navigation menu (...
0
votes
1
answer
27
views
React Admin Display API response
I am new to reach admin. So, I have an api call that return response like below.
{
"data": {
"type": "someType",
"id": "userid",
"attributes"...
0
votes
0
answers
14
views
Using reference field in Filter React Admin
I want to use dependable filters when I change make Id The Model list Change dynamically
const PostFilter = [
<ReferenceInput source="make" reference="makes" label="...
0
votes
0
answers
34
views
react-admin error: 'Cannot read properties of undifined (reading 'id')'
In react-admin library, when I try to post an object via http-request with the schema in the backend (id, firstname, lastname, email) with the id is autogenerated, It shows the error message : 'Cannot ...
0
votes
1
answer
32
views
Pass in state variable value, instead of variable in react lambda function
I have this react component:
export const ClientChannelsList = (props) => {
const [theDate, setTheDate] = useState(null);
const [theFilter, setTheFilter] = useState({
collectionQuery: c =&...
0
votes
2
answers
34
views
How make React admin's <SimpleFormIterator> behave as a stack on item addition (add item on top)?
I have an item with a nested list of items. I can edit these nested items individually using a <SimpleFormIterator> mixed with a <FormDataConsumer>. The issue is that when i insert a new ...
0
votes
1
answer
25
views
Set maximum form field length in React Admin
Is there some way to set a field in a SimpleForm within React-Admin to limit the number of characters a user can type into that field?
Based on the docs, the React-Admin framework itself does not ...
0
votes
1
answer
20
views
Pass custom properties in Resource in V4
Bit of a newbie here that recently moved to v4. I have some Resources declared using options to pass some custom property. In React Admin 3 syntax:
<Resource name='mydata' options={{label: "...
0
votes
1
answer
26
views
Should all react-admin field component props types extend TypographyProps besides PublicFieldProps and InjectedFieldProps?
I've noticed this type pattern in react-admin field component props types:
export interface MyCustomFieldProps
extends PublicFieldProps,
InjectedFieldProps,
TypographyProps {
[...
0
votes
0
answers
32
views
MUI - autocomplete not working inside React admin create component
I'm using mui's autocomplete component for my application. I'm using the sample code from https://mui.com/material-ui/react-autocomplete/#multiple-values under multiple values. When I tried this code ...
0
votes
0
answers
10
views
react admin refresh pass payload
I have some custom logic in react admin comonent (actually try to implement DatePicker). So i need to use useRefresh and pass some payload inside. But something goes wrong(it seems that useRefresh do ...
0
votes
0
answers
23
views
react admin useGetList with List component request api two times or how to prevent request api if already get data from useGetList
I use react admin with rest api and everything is fine till i need to manipulate data, so i decided to use useGetList from react admin and pass data through List
and it cause two times request my api:...
0
votes
0
answers
23
views
React-admin page refresh issues
When I go through the pages in react admin and refrsh for some need the route is redirected to the first tab. Is there any way to keep application on the same tab that it was before refresh?
0
votes
0
answers
17
views
LB4 data provider + custom data provider for Image Input - React admin
I am trying to upload file in react-admin ( Backend API in Loopback 4).React-admin provides documentation on how to setup a custom data provider for base64 file upload. and I also tried some ...
0
votes
0
answers
23
views
Correct syntax for mySQL UPDATE for express and node call
Can't seem to get the syntax correct for the UPDATE SQL command with my express API call when using string interpolation. Here is the error below. In addition I am using this with react-admin and I am ...
0
votes
1
answer
28
views
Implement BackButton in React-Admin v4
Before version 4, we could create BackButton like this:
import React, { Component } from 'react';
import { connect } from 'react-redux';
import Button from '@material-ui/core/Button';
import ArrowBack ...
0
votes
1
answer
68
views
React admin select input default empty value
I am using react admin's select input& I am currently on version 3.13 and this version allows the attribute 'allowEmpty' to show an extra empty field in the selection dropdown. Also we can use '...
0
votes
1
answer
24
views
How can i read data from ReferenceInput in React admin?
When I use the referencinput, it sends a request to the server, is it possible to somehow read what I received from the referencinput server and use these values in the farthest. Thank you for any ...
0
votes
1
answer
38
views
How can i fix React admin reference input problem?
When I use a reference input and select several values, I see the error
"Associated reference no longer appears to be available". I know that this error has occurred to people when they used ...
0
votes
0
answers
14
views
Animate datagrid record interactions
Has anyone used the Material UI animation options to animate interactions with the datagrid?
We have a task list with the option to change the status of the task. If someone marks the task as complete ...
0
votes
2
answers
76
views
Use confirm dialog before delete keep failing
I want to add react-admin a confirmation message like 'Do you want to delete item?'.
So I tried to use <DeleteButton /> with undoable={false} option and <DeleteWithConfirmButton /> ...
0
votes
1
answer
29
views
react-admin edit component is not working
I have been following the tutorial on react-admin and when I get to the part where you have to edit, a user for instance, the edit page shows up black with no errors in the devtool window. Please have ...
1
vote
1
answer
33
views
React admin pass a className to custom component
I got a datagrid in a react admin project with a custom button, and since it's in a a datagrid, the button is wrapped into a td tag, how can I target this td wrapping my button, I tried giving him a ...
0
votes
0
answers
35
views
Upgrading to react-admin v4. How do I upgrade material-ui to v5?
I'm upgrading a react-admin application from react admin v3 to v4. There's a note in the upgrade guide that I should also upgrade material-ui from v4 to v5 with a link to the (very lengthy) MUI ...
0
votes
0
answers
8
views
Remember specific site after authentication
I'm using the AuthProvider in react-admin with an OIDC solution. Everything works, except if users click on a specific site like myserver.com/cars/1 then they are redirected to login and after login, ...
0
votes
0
answers
8
views
Expect following JSON(mention in image) as output using react-admin framework
Below is the my code or react component:-
import { Box } from '@material-ui/core';
import React,{ useEffect, useState } from 'react'
import {
Create,
SimpleForm,
TextInput,
TextField,
...
1
vote
1
answer
54
views
Does react-admin v4 supported?
Yesterday the react-admin v4 has been released. I quickly tried to create a local version w/ api platform backend and HydraAdmin (@api-platform/admin) frontend. But it seems it does not work because ...
0
votes
2
answers
22
views
Format Numberfield in percentages
We have a NumberField which we want to use for a percentage value and used this:
<NumberField source="fee" options={{ style: 'percent' }} sortable={false} />
However, our API sends ...
0
votes
0
answers
18
views
How to use bulk actions for whole list of items, not only for items at the page you're opened
I have a page with list of items. There are a lot of pages of those items. I can click checkbox for making checked all items at current page. Is there any possible way to check whole list of items in ...
0
votes
0
answers
38
views
No reducer provided for key "admin" error in react admin
I am using redux in my react-admin panel. I am following the document Including React-Admin In Another Redux Application
But I get this error.
No reducer provided for key "admin"
I think ...
1
vote
1
answer
42
views
How to change datagrid rows text color in react-admin?
I want change a text color for row, but can't find decision. I tried this code. "color" not working, but "backgroundColor" working.
export const CustomersList = props => {
...
0
votes
0
answers
16
views
React Admin: ReferenceArrayField is not passing data to child
I am trying to display a datagrid of media of a product from a list of media ids. Using ReferenceArrayField component, the getMany() function of the media data provider is called. The fetching is ...
0
votes
0
answers
25
views
react admin filters grid layout
I may be asking easy question but I need some guidance here. I'm having difficulties to make filters grid layout rather than flex one.
In List component one can put an array of input componenets like ...
0
votes
1
answer
26
views
How can I do masked input using React Admin?
I'm using
<TextField source="phone" />
But I want to format the input to use masked input for phone format.
0
votes
2
answers
36
views
Only send data that has form inputs in edit
React admin does not respect the form inputs that are actually in the form when submitting data. It will instead send the entire record that was initially fetched, regardless of which inputs are ...
0
votes
0
answers
27
views
React Admin <ReferenceManyField> component is calling dataProvider.getList() and not dataProvider.getManyReference()
I want to list the credits of one product in my edit page. I am using <ReferenceManyField> component.
I created a resource for productCredits and its dataProvider with a getList and ...
0
votes
0
answers
20
views
How can I send more parameters in the edit rendering of a Resource component?
When I set a component as the edit prop for a resource, react-admin renders that component when users go to the /[resource]/:id URL.
But I would like to send more data as a parameter, for example make ...
0
votes
0
answers
24
views
Set value of ArrayInput based on list of values from ReferenceInput
I need to choose a deal family which has a list of deal levels, then set the ArrayInput's id to a list of those deal-levels, so that I can then add a discount and depletion for each deal level.
After ...
0
votes
1
answer
36
views
Rerender a row from Datagrid without refresh the whole list
In a List with DataGrid, in each row I have a button for change status, on button click I show a modal with a form, after submit, in the response I have updated object with the same id and new status, ...
0
votes
0
answers
17
views
React Admin, Next.js, Redux configuration
I added react-admin to an existing project using redux, following these instructions
https://marmelab.com/blog/2022/02/02/bootstrap-your-react-admin-project-with-nextjs.html
But unfortunately the /...
0
votes
0
answers
26
views
How to set values of ArrayInput based on value in ReferenceInput onChange?
I have a ReferenceInput above an ArrayInput. Once the ReferenceInput is changed, I need to go out and get a list of values based on that ReferenceInput id, then set the ArrayInput value to an array of ...
0
votes
0
answers
41
views
React-Admin v4: how to set basename with keyword after /#/
I'm trying the simplest React Admin v4 setup to have a path structure such as /#/{project}/resource..., for instance /#/project_1/user/, /#/project_2/user/ etc...
(I want everything under /#/ so I can ...
0
votes
2
answers
219
views
React Admin Tutorial by Marmelab not working
I am trying to follow this React-Admin tutorial by marmelab.com : https://marmelab.com/react-admin/Tutorial.html
After the following setup:
> npm create-react-app test-admin
> cd test-admin/
>...
0
votes
0
answers
23
views
React Admin - Edit and Show doesn't work in my List
I'm trying to create the edit and view option in my list, but it doesn't work using edit.
Here is a screenshot of what the result looks like: My list - result
import * as React from "react";
...
0
votes
0
answers
42
views
Problem connecting React Admin with Graphql using ra-data-graphql as a dataprovider
I'm try to connect React Admin using an API build in graphql using ra-data-graphql as a dataprovider, but my array of resources is always going empty.
Print of the response
import * as React from &...
0
votes
0
answers
41
views
React-admin: How to pass logged in user ID to API backend
I am using React-admin to make an application to manage articles and have many people logged in to write articles
I want to pass the USER_ID who is logged in to React-admin to CREATED_BY of API ...
0
votes
0
answers
68
views
how to force the refresh everytime when click the menu
im new to coding/react-admin and english
im trying to make Datagrid column looks better, so I tried to use headerClassName to change width.
and the problem is styles(width) are won't change until I ...
0
votes
1
answer
99
views
React Admin - how to create a large modal window
I open a dialog in React-Admin for the user to select an image. The issue is that I want this dialog to take up most of the screen but React Admin opens that modal with a class called MuiDialog-...