Nested Editing - In table form controls don't respect nesting level

Nested Editing - In table form controls don't respect nesting level

Ron WilsonRon Wilson Posts: 5Questions: 2Answers: 0

**Link to test case: https://live.datatables.net/lavoxowa/3/edit **:

Nested Editing - In table form controls

Reference Example

https://editor.datatables.net/examples/simple/inTableControls.html

Setup

Similar to the Nested editing - single selection example.
- A main table
- A main table editor
- An editor for the editor

All data is local to the js code. The main editor has a field that is a datatable. The dt editor field has two columns that are "In table form controls". Ignore the missing icons, I used the code from your example that uses fontawesome but there is no script or css available. Column index 2 is a pencil for 'edit' and the second icon column is a trashcan for 'delete'.

The 'click' event handler for the icon columns was inspired by the reference example for In table controls.

Error messages shown

None

Description of problem

Clicking on the pencil icon (column index 2) brings up the employee editor (the nested editor). Either making a change or just cancelling this editor should drop back (de-nest?) to the group editor but it drops back all the way to the main table.

How to reproduce

  • Load the test case page
  • Select one of the lines, and then the Edit button
  • Click on either in-table form control.
  • Accept or cancel the nested editor.

Answers

  • Ron WilsonRon Wilson Posts: 5Questions: 2Answers: 0

    Never mind, found the answer. (RTFM)
    Use the option nest:true in the options to the edit function.

  • allanallan Posts: 61,782Questions: 1Answers: 10,112 Site admin

    Thanks for the update - good to hear you found the solution!

    Allan

Sign In or Register to comment.