Clear tree before setting options to avoid duplicates

This commit is contained in:
nathan 2021-11-10 15:00:32 -07:00
parent 8a6c3b92bc
commit 52a2d4e9bb

View File

@ -386,6 +386,7 @@ export class et2_tree extends et2_inputWidget
f(data, f);
options = data;
}
this.input.deleteChildItems("0");
// if no options given, but autoloading url, use that to load initial nodes
if (typeof options.id == 'undefined' && this.input.XMLsource)
this.input.loadJSON(this.input.XMLsource);