Fixed #7150 - TreeTable: node added to column context options

pull/7157/head
tugcekucukoglu 2025-01-27 10:46:05 +03:00
parent 68fa947faf
commit e3238dbd7c
2 changed files with 33 additions and 2 deletions

View File

@ -146,7 +146,8 @@ export default {
frozen: this.columnProp('frozen'),
scrollable: this.$parentInstance.scrollable,
showGridlines: this.$parentInstance.showGridlines,
size: this.$parentInstance?.size
size: this.$parentInstance?.size,
node: this.node
}
};
@ -165,7 +166,8 @@ export default {
},
context: {
checked: this.checked,
partialChecked: this.partialChecked
partialChecked: this.partialChecked,
node: this.node
}
};

View File

@ -381,6 +381,10 @@ export interface TreeTableState {
* Defines current options in TreeTable component.
*/
export interface TreeTableContext {
/**
* Current node of the item.
*/
node: TreeNode;
/**
* Current index state of the item.
*/
@ -400,6 +404,31 @@ export interface TreeTableContext {
* @defaultValue false
*/
selected: boolean;
/**
* Current horizontal and/or vertical scrolling state.
* @defaultValue false
*/
scrollable: boolean;
/**
* Current show gridlines state.
* @defaultValue false
*/
showGridlines: boolean;
/**
* Current size of the table.
* @defaultValue null
*/
size: string | null;
/**
* Current check state of the node as a boolean.
* @defaultValue false
*/
checked: boolean;
/**
* Current partial check state of the node as a boolean.
* @defaultValue false
*/
partialChecked: boolean;
}
/**