Questions tagged [admin-on-rest]
Use it for questions about the admin-on-rest admin framework for React.js
501
questions
0
votes
1
answer
356
views
how to set <SimpleFormIterator> to show one row initially at page first load
As shown above, it only shows add button at first time page load, if user click submit button it will pass the validation because there is no input field to validate and then goes reach the API, ...
0
votes
1
answer
47
views
Admin-on-rest - Place pagination at top
I have defined a custom pagination component for a list view, but how do I place this pagination at the top of the list? Optimally, it should appear above the list content and below the filters.
1
vote
1
answer
178
views
HATEOAS backend?
I would like to use react-admin with my Restful HATEOAS inspired server.
Has anyone ever tried that?
Unfortunately, react-admin wants to work with id's and does not hand objects to the dataprovider. ...
1
vote
1
answer
252
views
React-admin implementation
I am very new to react-admin and having trouble to get the data on to the screen. After i read the documentation, this was how i implemented my code. I am able to get the data in the console.log of ...
1
vote
3
answers
1k
views
React admin access datagrid row value
Is there some way how to access Datagrid row value in react admin. I have code:
const OrdersDatagrid = function() {
let fakeProps = {
basePath: "/api/orders",
...
0
votes
1
answer
585
views
How to change column title datagrid?
How to change column title datagrid ?
I need to change the caption of the columns, but I'm not getting.
The Code:
<List title="Todos Usuários" {...props}>
<Datagrid>
<...
4
votes
0
answers
517
views
React admin login using customRoute not rerendering resources/drawer
I am using react-admin for a dashboard. Everything works fine, but using login on a custom page (using customRoutes) is not rererendering the drawer after the redirect.
Those are my custom routes:
...
4
votes
2
answers
4k
views
Not able to upload Image with ImageField in EDIT mode for react-admin
Using React Admin I am creating a dashboard for one of my clients and I have a requirement where I have to add the products of the client, out of the many fields there is one Image field too where I ...
1
vote
1
answer
392
views
Something went wrong page after after pressing on DeleteButton
Everytime I click on a delete button in a List component, the page shows this error page.
The deletion works though.
The error page
export const MaterialList = props => (
<List {......
3
votes
1
answer
1k
views
Show edited value in aside in react-admin
I am using react-admin for admin interface. In edit form aside i want to show edited value (just to understand how to capture form changed values, later will show data from api for those changed ...
1
vote
0
answers
493
views
React-Admin <SimpleForm> component doesn't trigger the "UPDATE" action in the data provider
So I'm using the ra-data-json-server as a data provider and the bult in <SimpleForm> component as a form for the <Edit> view, and I'm facing a pretty strange issue, as it says in ...
2
votes
1
answer
150
views
How can one capture user login success on react admin v3.1?
I am trying to capture a user login success by looking for any auth actions but I don't see any in the redux dev tool that has anything to do with AUTH? I want to use this to make an API call to fetch ...
0
votes
1
answer
558
views
CheckboxGroupInput not rendering after save in react-admin
I'm new to react and react-admin and I have a problem with CheckboxGroupInput or with any input of array type.
I have a form, this is the code:
export const MoviesCreate = (props) => (
<...
1
vote
0
answers
148
views
react-admin: How to suppress multiple 401 notifications?
I'm using react-admin and I have a page that makes api calls via the dataProvider to /posts, but there is also a custom UserMenu that fetches /user, and the authProvider also runs an AUTH_CHECK that ...
2
votes
1
answer
3k
views
How to add a "reset values" button to a react-admin edit form
Is there a way to have a button in a react-admin form so that when I click the button, the values are reset to the edited record's initial values?
I don't mean a Cancel button (that would close the ...
0
votes
1
answer
100
views
translate string in asyncValidate function
How I can translate error string using:
import { translate } from 'react-admin';
const CompanyValidate = (values) => {
return asyncValidate('companies', [
{
filters: {
...
6
votes
4
answers
5k
views
React-admin: how to hide refresh button from AppBar?
I'm creating admin ui based on react-admin and currently searching for a solution to hide the refresh button from the AppBar.
Disabling export button was trivial (exporter={false}). Is there anything ...
1
vote
0
answers
546
views
Disable autoComplete in AutocompleteInput at react-admin
In general question: How to add custom autocomplete value to the AutocompleteInput ?
Problem started when you will try to add options to the AutocompleteInput:
<ReferenceInput source="company_id" ...
1
vote
2
answers
2k
views
Admin-on-rest 'Edit Page - Incorrect Element Error // Create Page - element does not exist Error'
I'm using admin on rest with express/mongodb, every things works correctly (CRUD), but I have some errors that have appeared and I have no explanation for that,
when I create an object a notification ...
0
votes
1
answer
300
views
Can`t use custom restClient for replacing id to _id. Parsing error: Unexpected token
I`m trying to change restClient to support mongoDB(replace id to _id).
This is documantation https://marmelab.com/admin-on-rest/FAQ.html#can-i-have-custom-identifiers-primary-keys-for-my-resources. I ...
0
votes
1
answer
234
views
react-admin: changing a list from store without http requests
I am using react-admin and I need to control directly the store from one resource, in my case, the orders resource.
Everytime I run the GET_LISTit appends the new records in the list from the store, ...
0
votes
1
answer
45
views
How to import query reducer, removekey and other modules from admin-on-rest to custom list?
I am creating a custom List component by referring to admin-on-rest List component. I imported all modules from admin-on-rest. But few modules are not getting imported and giving an error like ...
0
votes
0
answers
291
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 ...
2
votes
2
answers
2k
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
1
answer
105
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 ...
3
votes
3
answers
9k
views
React-Admin | Cannot upload a file using FileInput
First time with React-Admin. I am using it to create a panel that basically monitors some parameters that I get from an API. However, one section requires a .csv file to be uploaded. I am trying to ...
4
votes
2
answers
2k
views
How do you integrate aws-amplify authentication with react-admin?
I'm trying to implement aws-amplify to my react-admin.
Especially for the Authentication part.
Instead of having something like this:
react-admin with Amplify NavBar on top
I'm looking to have "...
6
votes
1
answer
277
views
In Custom App with embedded Admin, adminSaga doesn't work
I am trying to embed React Admin (RA) into an existing React-Redux application and following the documentation here: https://marmelab.com/react-admin/CustomApp.html
While I have managed to ...
1
vote
0
answers
41
views
Build a two-level resource using react-admin [duplicate]
If I have an API endpoint called apps which will retrieve a list a different apps.
And I also have an API endpoint called apps/{app_id}/app-versions which will retrieve a list of release versions ...
2
votes
1
answer
284
views
Common persons table with specific tables for teachers and students or separate tables?
I'm using react-admin with hasura as an API for Postgres.
I have a need for different entities that are all basically a person but with different purposes. Eg. a student and a teacher. I am thinking, ...
-1
votes
1
answer
38
views
Will admin on rest play nicely with cloudinary/postgres on the same tab?
Before i start looking down this road i have different datasources that would need to be updated in the same tab if i was to attempt to use react-admin, wondering if i'll be able to modify it to do ...
0
votes
0
answers
502
views
react-admin, Icons disappear when collapsing menu, leaving only labels
As title.
Details in images
Versions:
"@material-ui/core": "^1.4.0",
"@material-ui/icons": "^1.0.0",
"ra-core": "^2.5.2",
"react-admin": "^2.1.4",
Not collapsed
Collapsed
Root....
-3
votes
2
answers
46
views
optimized array an object to a select admin on rest
How can I do a for with the array? and not doing it as I have it is not optimal, because it is a manual method and I want to optimize it
const choices = [
{ id: '1', name: '1' },
{ id: '2', ...
0
votes
1
answer
359
views
Polyglot seems not working when using translate function
The transalte's polyglot feature don't work (i'm in the last version of react-admin) :
this my language file :
export default
{
"labels": {
"num_files": "%{count} file |||| %{count} ...
0
votes
1
answer
4k
views
TypeError: translate is not a function
There is no errors and warnings in compiling but when i launch my project i get this error :
TypeError: translate is not a function
289 | inputProps={{
> 291 | placeholder: translate('labels....
0
votes
0
answers
773
views
How to dispatch a separate custom action in react-admin?
I want to dispatch a plain redux action of my own choosing on app startup, and trap it in a custom saga, within an <Admin> app. I've read the doc about custom action creators but (a) it only ...
1
vote
1
answer
41
views
How can I access the data in custom toolbar for admin-on-rest?
I use admin-on-rest. I made a custom toolbar for the user data edit page. How inside this toolbar to get access to user data?
1
vote
1
answer
702
views
Charts on Admin-on-rest
I need to do a webpage to finish my uni, and im about 90% done with it, however, im struggling with getting custom Iterators and Charts to work.
Im trying to use Recharts, but i have no idea on how to ...
0
votes
1
answer
1k
views
show header even when there is no data to show in admin on rest datagrid
I am using admin-on-rest to display a list of data. In the Datagrid when there is no data coming from the response the Datagrid shows No results found . But I want to show the headers. is there ...
0
votes
1
answer
159
views
My rejected promise in AUTH_CHECK don't do anything
In the AUTH_CHECK of my authprovider i validate my token :
if (type === AUTH_CHECK) {
return isTokenValid(localStorage.getItem('token')) ? Promise.resolve() : Promise.reject()
}
After my ...
0
votes
1
answer
207
views
How do I make a SelectInput which is part of the filter to be displayed by default?
I have an admin-on-rest system that shows a page with a list, and I have 2 fields in the filter, one (q - free text search) that I want to always display, and the second one is a status-select, which ...
5
votes
2
answers
2k
views
disabling autocomplete for admin-on-rest SimpleForm
Is there a possibility to disable autocomplete for AOR SimpleForm component?
I tried various combinations of the following:
<SimpleForm autoComplete="off">
But nothing seems to work.
Can it be ...
1
vote
2
answers
657
views
authProvider is finishing its Promise after the Dashboard being mounted
Using [react-admin]
I have a customDashboard that verifies a parameter and redirect to the a page called pages:
class DashBoard extends Component {
componentDidMount() {
const { push } = ...
0
votes
1
answer
356
views
Only allow creation of new ArrayInput elements in edit/create & make existing ones immutable/display only
I have been reading the docs and forum for a day and haven't found a solution to my answer. I am wondering if the following is possible with react-admin.
I have a resource documents that for which ...
0
votes
2
answers
351
views
No translation for MenuItemLink's primaryText in react-admin
I'm using a custom user menu and the primarytext is not translated as expected.
No problems with the others components.
const MyUserMenu = props =>
<UserMenu {...props}>
<...
0
votes
1
answer
287
views
Integrate mui-datatable with admin-on-rest
How to integrate mui-datatable with admin-on-rest?
Need the following options in the list view :
move around ordering of columns
show/hide columns
change the number of rows for display
print preview ...
0
votes
3
answers
7k
views
Add a top level menu in react-admin
How can i a a top level menu in the appbar between the title and the usermenu ?
I tried something like this, but it do not work :
const MyAppBar = props => <AppBar {...props} userMenu={<...
0
votes
1
answer
5k
views
Creating a custom action in react-admin I cannot see where to link to my dataprovider
I am following this tutorial to create custom actions in React-admin (former Admin-on-rest): using a custom action creator.
However, after implement it, my code is not doing anything, i.e., the ...
0
votes
1
answer
5k
views
Where I can change the profile picture in the react-admin header?
I am using social login in react-admin (former admin-on-rest) and I have the user picture from his social media, however I didn't find how to change the user profile image in the top right corner of ...
0
votes
0
answers
177
views
How to disable routing for some routes in react-admin?
I want to open some xml files from my site in the path : /file/*
ex: www.mysite.com/files/myfile.xml
Bu when i try to open my file with a window.open it's redirecting to the root and don't open my ...