From f74e7692d7423ac3537ecd393415a08f7d8361ea Mon Sep 17 00:00:00 2001 From: LE SAULNIER Kevin Date: Fri, 30 Aug 2024 11:10:12 +0200 Subject: [PATCH 1/4] feat: improve secondary action callback + implement handle item click Signed-off-by: LE SAULNIER Kevin --- demo/src/app.jsx | 15 +++++++-------- .../CheckBoxList/check-box-list-item.tsx | 10 +++++++--- .../CheckBoxList/check-box-list-items.tsx | 19 +++++-------------- .../CheckBoxList/check-box-list-type.ts | 19 +++++++++++++------ .../CheckBoxList/clickable-check-box-item.tsx | 4 ++-- .../CheckBoxList/clickable-row-item.tsx | 12 ++++++++---- .../draggable-check-box-list-item.tsx | 7 ++++--- .../draggable-clickable-row-item.tsx | 13 +++++++++---- 8 files changed, 55 insertions(+), 44 deletions(-) diff --git a/demo/src/app.jsx b/demo/src/app.jsx index 2406b011..2a76a58f 100644 --- a/demo/src/app.jsx +++ b/demo/src/app.jsx @@ -558,11 +558,12 @@ function AppContent({ language, onLanguageClick }) { }, ]); - const secondaryAction = () => ( - - - - ); + const secondaryAction = (item, isItemHovered) => + isItemHovered && ( + + + + ); const defaultTab = (
@@ -602,8 +603,6 @@ function AppContent({ language, onLanguageClick }) { divider secondaryAction={secondaryAction} addSelectAllCheckbox - isCheckboxClickableOnly - enableSecondaryActionOnHover />