You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What you were expecting:
When using ReferenceInput expect to get LinearProgress instead of empty input (SelectInput or any other valid children) while data is loading.
I manually set delay in dataProvider to 3 seconds, but loader wasn't shown.
What happened instead:
ReferenceInput renders children like data was loaded, but in reality it's still loading.
Steps to reproduce:
Add ReferenceInput in create/edit form. Simulate delay in data provider more than 1 sec.
Possible solution
I think problem is in "useReferenceInputController" when it generates "dataStatus.waiting", because finalData is always empty object and "matchingReferences" will be always empty array.
Yes, we had a fix which has been reverted in 3.11 because it introduced other issues. We fixed it in 3.12 by giving the loader display responsability to the ReferenceInput children. See #5767
What you were expecting:
When using ReferenceInput expect to get LinearProgress instead of empty input (SelectInput or any other valid children) while data is loading.
I manually set delay in dataProvider to 3 seconds, but loader wasn't shown.
What happened instead:
ReferenceInput renders children like data was loaded, but in reality it's still loading.
Steps to reproduce:
Add ReferenceInput in create/edit form. Simulate delay in data provider more than 1 sec.
Possible solution
I think problem is in "useReferenceInputController" when it generates "dataStatus.waiting", because finalData is always empty object and "matchingReferences" will be always empty array.
Other information:
There was already issue opened
#5731
https://stackoverflow.com/questions/65488613/react-admin-referenceinput-doesnt-show-loading-linearprogress-while-loading?noredirect=1#comment115901905_65488613
CodeSandbox
https://codesandbox.io/s/admiring-monad-uludk?file=/src/dataProvider.js
Environment
no_loader.mp4
The text was updated successfully, but these errors were encountered: