Skip to content

Commit

Permalink
Merge pull request #25882 from c3024/25859-disable-checkbox-and-selec…
Browse files Browse the repository at this point in the history
…t-all

show disabled cursor on checkbox and "Select All" if they are unclickable
  • Loading branch information
aldo-expensify authored Aug 24, 2023
2 parents 9a599aa + 54a17cf commit b38181a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/SelectionList/BaseSelectionList.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,11 +339,13 @@ function BaseSelectionList({
accessibilityLabel={translate('workspace.people.selectAll')}
accessibilityRole="button"
accessibilityState={{checked: flattenedSections.allSelected}}
disabled={flattenedSections.allOptions.length === flattenedSections.disabledOptionsIndexes.length}
>
<Checkbox
accessibilityLabel={translate('workspace.people.selectAll')}
isChecked={flattenedSections.allSelected}
onPress={onSelectAll}
disabled={flattenedSections.allOptions.length === flattenedSections.disabledOptionsIndexes.length}
/>
<View style={[styles.flex1]}>
<Text style={[styles.textStrong, styles.ph5]}>{translate('workspace.people.selectAll')}</Text>
Expand Down

0 comments on commit b38181a

Please sign in to comment.