From e412f9b13971054699e44c0704c34e597975ade4 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Mon, 11 Mar 2024 14:28:43 +0700 Subject: [PATCH 1/2] fix parent option is not greyout --- src/components/SelectionList/BaseListItem.tsx | 2 +- src/components/SelectionList/RadioListItem.tsx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/SelectionList/BaseListItem.tsx b/src/components/SelectionList/BaseListItem.tsx index c032fe2d081b..302d111dc141 100644 --- a/src/components/SelectionList/BaseListItem.tsx +++ b/src/components/SelectionList/BaseListItem.tsx @@ -69,7 +69,7 @@ function BaseListItem({ accessibilityLabel={item.text} role={CONST.ROLE.BUTTON} hoverDimmingValue={1} - hoverStyle={!item.isSelected && styles.hoveredComponentBG} + hoverStyle={(!item.isDisabled && !item.isSelected ) && styles.hoveredComponentBG} dataSet={{[CONST.SELECTION_SCRAPER_HIDDEN_ELEMENT]: true}} onMouseDown={shouldPreventDefaultFocusOnSelectRow ? (e) => e.preventDefault() : undefined} nativeID={keyForList} diff --git a/src/components/SelectionList/RadioListItem.tsx b/src/components/SelectionList/RadioListItem.tsx index be2302d21b89..73e71931d856 100644 --- a/src/components/SelectionList/RadioListItem.tsx +++ b/src/components/SelectionList/RadioListItem.tsx @@ -49,6 +49,7 @@ function RadioListItem({ styles.sidebarLinkTextBold, isMultilineSupported ? styles.preWrap : styles.pre, item.alternateText ? styles.mb1 : null, + isDisabled && styles.colorMuted, ]} numberOfLines={isMultilineSupported ? 2 : 1} /> From ce72028b03b57adf329b1d735d938b85556a5371 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Tue, 12 Mar 2024 09:26:44 +0700 Subject: [PATCH 2/2] fix lint --- src/components/SelectionList/BaseListItem.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/SelectionList/BaseListItem.tsx b/src/components/SelectionList/BaseListItem.tsx index 302d111dc141..a97ec75f9a72 100644 --- a/src/components/SelectionList/BaseListItem.tsx +++ b/src/components/SelectionList/BaseListItem.tsx @@ -69,7 +69,7 @@ function BaseListItem({ accessibilityLabel={item.text} role={CONST.ROLE.BUTTON} hoverDimmingValue={1} - hoverStyle={(!item.isDisabled && !item.isSelected ) && styles.hoveredComponentBG} + hoverStyle={!item.isDisabled && !item.isSelected && styles.hoveredComponentBG} dataSet={{[CONST.SELECTION_SCRAPER_HIDDEN_ELEMENT]: true}} onMouseDown={shouldPreventDefaultFocusOnSelectRow ? (e) => e.preventDefault() : undefined} nativeID={keyForList}