File tree Expand file tree Collapse file tree
src/components/SelectionList/ListItem Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,8 +41,7 @@ function SelectableListItem<TItem extends ListItem>({
4141 < ButtonComponent
4242 item = { item }
4343 onSelectRow = { onSelectionButtonPress ?? onSelectRow }
44- // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- disabled if either of the optional booleans are true
45- disabled = { isDisabled || item . isDisabledCheckbox }
44+ disabled = { ( ! ! isDisabled && ! item . isSelected ) || item . isDisabledCheckbox }
4645 style = { styles . ml3 }
4746 />
4847 { typeof rightHandSideComponent === 'function' ? rightHandSideComponent ( item , isFocused ) : rightHandSideComponent }
@@ -58,8 +57,7 @@ function SelectableListItem<TItem extends ListItem>({
5857 < ButtonComponent
5958 item = { item }
6059 onSelectRow = { onSelectionButtonPress ?? onSelectRow }
61- // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- disabled if either of the optional booleans are true
62- disabled = { isDisabled || item . isDisabledCheckbox }
60+ disabled = { ( ! ! isDisabled && ! item . isSelected ) || item . isDisabledCheckbox }
6361 style = { styles . mr3 }
6462 />
6563 { typeof children === 'function' ? children ( hovered ) : children }
You can’t perform that action at this time.
0 commit comments