react-antd-admin-panel
Version:
Easy prototyping admin panel using React and Antd
22 lines • 829 B
JavaScript
import DefaultItem from "./DefaultItem";
export default class TreeItem extends DefaultItem {
constructor(r, merge) {
super(r, merge);
this._show = true;
this._disabled = false;
this._canBeLoaded = true;
this._canBeEdited = true;
this.key = 0;
this.isLeaf = false;
this.children = [];
}
leaf(v) { this.isLeaf = v ? v : !v; return this; }
show(v) { this._show = v; return this; }
disabled(v) { this._disabled = v; return this; }
canBeLoaded(v) { this._canBeLoaded = v; return this; }
canBeEdited(v) { this._canBeEdited = v; return this; }
label(v) { this._label = v; return this; }
id(v) { this._id = v; return this.index(v); }
index(v) { this.key = v; return this; }
}
//# sourceMappingURL=TreeItem.js.map