From b9053eb38a7cea699683957bc343b1745fc2c4fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81d=C3=A1m=20Hassan?= Date: Thu, 28 Sep 2023 11:44:18 +0200 Subject: [PATCH] select on row click --- .../src/components/tree-picker/tree-picker.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/sn-pickers-react/src/components/tree-picker/tree-picker.tsx b/packages/sn-pickers-react/src/components/tree-picker/tree-picker.tsx index f2a143597..75355019f 100644 --- a/packages/sn-pickers-react/src/components/tree-picker/tree-picker.tsx +++ b/packages/sn-pickers-react/src/components/tree-picker/tree-picker.tsx @@ -21,7 +21,7 @@ export function TreePicker, node: T) => { + (_event: unknown, node: T) => { if (!node.isParent) { const newSelection = props.allowMultiple ? selection.filter((item) => item.Id !== node.Id) : [] if (newSelection.length === selection.length || (!props.allowMultiple && selection[0].Id !== node.Id)) { @@ -106,7 +106,10 @@ export function TreePicker {items?.map((item) => ( -
onDoubleClickHandler(e, item as any)} key={item.Id}> +
onCheckedChangeHandler(e, item as any)} + onDoubleClick={(e) => onDoubleClickHandler(e, item as any)} + key={item.Id}> {renderItem(item as any)}
))}