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
exportdefaultfunctionViewAgentModal({ agent, shipments =[]}: ViewAgentModalProps){return(<Modal>{({ close })=>(// ...<Deferreddata="shipments"fallback={<TableDataLoader/>}><DataTabledata={shipments}columns={columns}/></Deferred>// ...)}</Modal>);}
Issue:
The deferred data (shipments) is always undefined within the Modal component, even though it's properly set up on the backend. The fallback component is shown, but the actual data never loads.
Questions:
Is there a known limitation with using Inertia's Deferred component inside Modal components?
Do I need to handle deferred props differently when they're used within a Modal context?
Lastly, is there a recommended pattern for loading deferred data in Modals?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm encountering an issue where Inertia's deferred props are not working correctly when used within an Inertia UI Modal component.
Setup:
@inertiaui/modal-react
for the Modal component@inertiajs/react
for the Deferred componentCode Example:
Backend (Controller):
Frontend (Modal Component):
Issue:
The deferred data (
shipments
) is always undefined within the Modal component, even though it's properly set up on the backend. The fallback component is shown, but the actual data never loads.Questions:
Beta Was this translation helpful? Give feedback.
All reactions