Nested drag and drop widget Stuck at Loading

0
We are using nested Drag and Drop widgets. When a row in the parent Drag and Drop widget is expanded, the nested Drag and Drop section becomes visible through a visibility condition. Occasionally, instead of displaying the data, the nested widget remains stuck on "Loading..." indefinitely. Has anyone encountered this behavior or found a solution?
asked
2 answers
0

Hi Chandra,


I have seen similar behavior with nested drag-and-drop widgets when the child widget is rendered only after a visibility condition changes.


The first thing I would check is the conditional visibility around the nested Drag and Drop widget. The widget needs to initialize when it is rendered, and rendering it only after the parent row is expanded can expose initialization/state issues.


I would test this by temporarily removing the visibility condition and keeping the nested Drag and Drop widget rendered from the beginning.


If the issue disappears, then the problem is most likely related to the widget being initialized after the parent container becomes visible, rather than the drag/drop data itself.

The Drag and Drop (Updated) widget also uses configuration/state objects such as Widget JSON State and Unique Iteration, so I would make sure that each nested instance gets the correct unique state/context rather than sharing the same state object between parent and child widgets. The widget's documentation and examples specifically use these properties to manage the state of the drag-and-drop instances.

I would test the page in this order:

1. Remove the visibility condition
        ↓
2. Confirm the nested widget loads normally
        ↓
3. If yes → visibility/lifecycle issue
        ↓
4. Check Widget JSON State
        ↓
5. Check Unique Iteration
        ↓
6. Make sure parent and child widgets
   do not share the same state

Also make sure the nested widget has a unique iteration/state value for every parent row. If all nested instances resolve to the same value, the widget can end up reusing the same client-side state when different rows are expanded.


I would also verify that you are using the latest widget version supported by your Mendix version. The Marketplace currently lists Drag and Drop (Updated) 3.0.4, and version 3.x is intended for Mendix 9.6 and later.


If removing the visibility condition fixes the problem, I would avoid trying to solve it with arbitrary delays or JavaScript. Instead, restructure the page so the Drag and Drop widget is present when the page is initialized and control the content/expanded state rather than creating/destroying the widget itself through conditional visibility.


If it still remains on Loading... even when the nested widget is always rendered, then I would look next at the datasource and widget state. In that case, I would compare the Widget JSON State and Unique Iteration values between a working parent row and a failing one.


Hope this helps.

answered
0

We've seen similar behavior with nested widgets when the child datasource depends on an object that isn't fully available yet when the row expands.

One thing I'd check is whether the nested Drag & Drop datasource microflow/nanoflow is being called every time the issue occurs. If the widget is stuck on "Loading...", look at the browser console and network requests to confirm the datasource request actually completes.

I would also verify that the context object passed to the nested widget is unique per row and still exists after any refresh actions. In a few cases, we've had widgets remain in a loading state because the parent object was refreshed or recreated while the child widget was still initializing.

If possible, try replacing the nested Drag & Drop temporarily with a simple List View using the same datasource. If the List View also hangs, the issue is likely in the datasource/context. If the List View loads correctly, then the problem is more likely widget-specific.


answered