TreeNode pt option updates

pull/6483/head
tugcekucukoglu 2024-09-26 15:38:30 +03:00
parent d8fde3e523
commit cc88a59a1a
2 changed files with 11 additions and 0 deletions

View File

@ -205,6 +205,10 @@ export interface TreeState {
* Defines current options in Tree component. * Defines current options in Tree component.
*/ */
export interface TreeContext { export interface TreeContext {
/**
* Current tree node instance
*/
node: TreeNode;
/** /**
* Index of the node. * Index of the node.
*/ */
@ -224,6 +228,11 @@ export interface TreeContext {
* @defaultValue false * @defaultValue false
*/ */
checked: boolean; checked: boolean;
/**
* Current partial checked state of the node as a boolean.
* @defaultValue false
*/
partialChecked: boolean;
/** /**
* Current leaf state of the node as a boolean. * Current leaf state of the node as a boolean.
* @defaultValue false * @defaultValue false

View File

@ -137,10 +137,12 @@ export default {
getPTOptions(key) { getPTOptions(key) {
return this.ptm(key, { return this.ptm(key, {
context: { context: {
node: this.node,
index: this.index, index: this.index,
expanded: this.expanded, expanded: this.expanded,
selected: this.selected, selected: this.selected,
checked: this.checked, checked: this.checked,
partialChecked: this.partialChecked,
leaf: this.leaf leaf: this.leaf
} }
}); });