Prevent input select parser from handling events from child rows#1399
Conversation
|
Thanks! I appreciate it! |
|
Hey @andysleigh! I ended up adding an option ( |
|
Hi @Mottie, The error in updateCell is why I originally went about making this change. But from my understanding, we would never need to call updateCell for a child row cell, as these are not held in the internal cache, which is why I just disabled it altogether. Please let me know if I've missed something. |
|
The child rows are held in the cache along with the parent row. If you look at the cache for a parent row, you'll see this: [
"parent row 1 col 1",
"parent row 1 col 2",
{
// jQuery object
$row: [
$parentRow,
$childRow1,
$childRow2
],
// child row text (parsed)
child: [
[
"child row 1 col 1",
"child row 1 col 2"
],
[
"child row 2 col 1",
"child row 2 col 2"
]
],
// original parent row index (used when sort is reset)
order: 0,
// unparsed raw text content from the parent row
raw: [
"parent row 1 col 1",
"parent row 1 col 2"
]
}
] |
Currently the input select parser is handling events from all rows within a table. It should not be handling events from child rows. When it does the call to updateCell fails as this does not expect to be called on child row cell. The fix is to return from the event handlers immediately if the row is a child row.