patternfly-bootstrap-treeview icon indicating copy to clipboard operation
patternfly-bootstrap-treeview copied to clipboard

removeNode with silent: true still fires treeview rendered event

Open keithabramo opened this issue 6 years ago • 1 comments

When calling removeNode with the silent: true modifier set, the method still triggers the treeview rendered event.

Steps to reproduce:

  1. make a call like .treeview("removeNode", [nodesToRemove, { silent: true }]);
  2. Observe treeview's "rendered" event is called again if nodes were removed.

keithabramo avatar May 07 '19 13:05 keithabramo

This has been a problem for me too, since calling removeNode with a null seems to be the only workaround for refreshing the treeview with updated data.

Whilst the function takes an options structure, it doesn't do anything with it. This is not used in the function: `options = $.extend({}, _default.options, options);

I believe it should be passed to _setInitialStates, because within that function, the default options are used to determine whether events are fired.

mwr9uk avatar Jan 30 '20 21:01 mwr9uk