diff --git a/src/components/SelectionList/BaseListItem.tsx b/src/components/SelectionList/BaseListItem.tsx index 67de9153d0d6..6acb9284db6b 100644 --- a/src/components/SelectionList/BaseListItem.tsx +++ b/src/components/SelectionList/BaseListItem.tsx @@ -58,75 +58,85 @@ function BaseListItem({ }; return ( - onSelectRow(item)} - disabled={isDisabled} - accessibilityLabel={item.text ?? ''} - hoverDimmingValue={1} - hoverStyle={!item.isDisabled && !item.isSelected && styles.hoveredComponentBG} - onMouseDown={shouldPreventDefaultFocusOnSelectRow ? (e) => e.preventDefault() : undefined} - nativeID={keyForList ?? ''} - style={pressableStyle} + onDismissError(item)} + pendingAction={pendingAction} + errors={errors} + errorRowStyles={styles.ph5} + style={containerStyle} > - - {canSelectMultiple && checkmarkPosition === CONST.DIRECTION.LEFT && ( - - - {item.isSelected && ( - - )} - - - )} - - {typeof children === 'function' ? children(hovered) : children} + onSelectRow(item)} + disabled={isDisabled} + accessibilityLabel={item.text ?? ''} + role={CONST.ROLE.BUTTON} + hoverDimmingValue={1} + hoverStyle={!item.isSelected && styles.hoveredComponentBG} + dataSet={{[CONST.SELECTION_SCRAPER_HIDDEN_ELEMENT]: true}} + onMouseDown={shouldPreventDefaultFocusOnSelectRow ? (e) => e.preventDefault() : undefined} + nativeID={keyForList ?? ''} + style={pressableStyle} + > + + {canSelectMultiple && checkmarkPosition === CONST.DIRECTION.LEFT && ( + + + {item.isSelected && ( + + )} + + + )} - {canSelectMultiple && checkmarkPosition === CONST.DIRECTION.RIGHT && ( - - - - )} + {typeof children === 'function' ? children(hovered) : children} - {!canSelectMultiple && item.isSelected && !rightHandSideComponent && ( - - - + + + )} + + {!canSelectMultiple && item.isSelected && !rightHandSideComponent && ( + + + + - - )} - {rightHandSideComponentRender()} - - {FooterComponent} - + )} + {rightHandSideComponentRender()} + + {FooterComponent} + + ); } diff --git a/src/components/SelectionList/TableListItem.tsx b/src/components/SelectionList/TableListItem.tsx index 1fb996bc13b9..b7c3ed549d82 100644 --- a/src/components/SelectionList/TableListItem.tsx +++ b/src/components/SelectionList/TableListItem.tsx @@ -31,6 +31,10 @@ function TableListItem({ return ( {!!item.alternateText && ( - //