Tree stops functioning after calling grid.set('columns', columns)
with previous columns
#1255
Milestone
grid.set('columns', columns)
with previous columns
#1255
This is very easy to reproduce, once you have created a tree grid, simply set the columns again with the same columns:
And you will no longer be able to expand nodes. I reproduced it on common_cases.html with the tree grid there.
The cause of the issue is that the tree column will set
_isConfiguredTreeColumn
to true. When you later reset the columns,_destroyColumns
will remove the expando listener. When the columns are reconfigured,_configureTreeColumn
will be properly called, but will immediately return because_isConfiguredTreeColumn
is still true, so the listener will never be re-added. Also,_treeColumn
is nulled in_destroyColumns
, and won't get reset by_configureTreeColumn
, so even ifexpand
does get called, it will immediately return as well because_treeColumn
isn't set.This is actually a regression due to:
26a6d00
Prior to that commit,
_configureTreeColumn
properly scoped the column configuration code inside the conditionally branch of_isConfiguredTreeColumn
, and properly re-added the listener and_treeColumn
when tree columns were reconfigured.I could put together a pull request, but clearly the regression commit was trying to accomplish something, so I thought I would start by just identifying the exact cause.
The text was updated successfully, but these errors were encountered: