Skip to content

Commit 304aa6a

Browse files
authored
Add Path to emit
Receiving true or false doesn't provide much context to which bracket got collapsed in order to build smarter functionality and optimizations based on the collapsed field.
1 parent 83391ad commit 304aa6a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/Tree/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,12 +233,12 @@ export default defineComponent({
233233
if (props.collapsedOnClickBrackets) {
234234
updateCollapsedPaths(collapsed, path);
235235
}
236-
emit('bracketsClick', collapsed);
236+
emit('bracketsClick', collapsed, path);
237237
};
238238

239239
const handleIconClick = (collapsed: boolean, path: string) => {
240240
updateCollapsedPaths(collapsed, path);
241-
emit('iconClick', collapsed);
241+
emit('iconClick', collapsed, path);
242242
};
243243

244244
const handleValueChange = (value: unknown, path: string) => {

0 commit comments

Comments
 (0)