question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ReferenceInput loads its data before its containing view

See original GitHub issue

RefereneInput loads its items before its own container. This is a problem for me, because my api sets up at the server what the RefereneInput is going to load. I don’t know if this is a bug or a limitation or how to change the order of the calls.

screen-shot

https://codesandbox.io/s/heuristic-kepler-m2zkf?file=/src/index.js (Just in case)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
WiXSLcommented, Dec 16, 2020

@MicroJackson, Your example work for me only the first time, using useVersion allows me to re-fetch after each refresh of the form’s data. React-admin’s fetch data hooks use it.

1reaction
fzaninottocommented, Dec 15, 2020

We haven’t thought about doing these queries in a particular order. It’s a result of the react rendering and effect process.

I don’t think it’s a bug. And if it matters, as in your case, you can use @MicroJackson’s trick.

So 4Im closing this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to set default value in referenceinput in react - admin
after some research and test I made a possible solution: const SelectInputDefaultValue = ({ optionText, ...rest }) => { const {choices} ...
Read more >
Input Components - React-admin - Marmelab
An Input component displays an input, or a dropdown list, a list of radio ... component to see the underlying MUI component and...
Read more >
React Admin Modal: Create Record Without Leaving Page
A step-by-step example of how to create record using React modal. Create & add a record without leaving the page. React code inluded....
Read more >
RTI Connector for Python 1.2.0 documentation
Operations on the same Connector instance or its contained entities are not ... when you write data, the Inputs will receive the data...
Read more >
Accessing Tracked Entities - EF Core - Microsoft Learn
IsKeySet, Whether or not the entity has had its key value set. ... or collection from the database; see Explicit Loading of Related...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found