mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-04 23:28:41 +02:00
MINOR Avoid applying jstree plugin multiple times when onmatch is called on CSS class changes, rather than DOM insertions
This commit is contained in:
parent
0c6bc2f7a1
commit
746e3ea05e
@ -12,6 +12,9 @@
|
|||||||
|
|
||||||
onmatch: function() {
|
onmatch: function() {
|
||||||
this._super();
|
this._super();
|
||||||
|
|
||||||
|
// Don't reapply (expensive) tree behaviour if already present
|
||||||
|
if(!$.isNaN(this.data('jstree_instance_id'))) return;
|
||||||
|
|
||||||
var hints = this.attr('data-hints');
|
var hints = this.attr('data-hints');
|
||||||
if(hints) this.setHints($.parseJSON(hints));
|
if(hints) this.setHints($.parseJSON(hints));
|
||||||
|
Loading…
Reference in New Issue
Block a user