hi,
i have a table where i applied this function.
drag & drop work fine!
now, in the table, for some rows, i have inserted a second table, with this function.
in the nested table, d&d working fine, but in the main, it catch also the id of the second table.
i wrong something?
Hi,
I think same drag and drop handler is being applied for both levels without proper scoping. If you can share your OML or relevant code screenshot it will be easy to take a look and provide solution.
Thanks,
Sriyamini.J
i found something else that not working fine.
take my oml.
there is a table with sortable and nested a second table.
if i try the drag and drop, the event doesn t fired.
if i hide the container of second table, event work as shoud be.
Hi @emanuele mantovanelli
In your case, you should disable drag on parent rows that contain nested tables.
If rows with nested tables should not be reordered, add a CSS class like: no-drag
Apply it to rows that contain the nested table
Configure the Forge asset: Draggable Selector:- exclude .no-drag
@emanuele mantovanelli
I think it's not at fault. This behavior is normal when using the Drag & Drop Sortable Table (O11) asset that incorporates nested tables.
**Explanation**
The Forge component employs a JavaScript sorting mechanism that operates by monitoring drag events within a container. When a sortable table is embedded within another sortable table, both tables share the same drag context. Consequently, any drag events initiated in the nested table will elevate (bubble up) to the parent table.
Due to this event propagation:
- Drag and drop functionality operates correctly within the nested table.
- However, the parent table also detects the drag event, along with the row ID from the nested table.
- This leads to the parent table responding, even though the drag action was meant exclusively for the inner table.
This is a technical constraint related to nested sortable containers and is not due to misconfiguration or a bug in OutSystems.
**Recommended Approaches**
- Utilize distinct drag scopes or groups for the parent and nested tables (if the asset allows for it).
- Use custom JavaScript to prevent event bubbling from the nested table (stopPropagation).
- Temporarily disable drag functionality on the parent table while interacting with the nested table.