Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Dropdown button is not disabled when no selection is made #46679

Merged
merged 1 commit into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/pages/ReportParticipantsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ function ReportParticipantsPage({report}: WithReportOrNotFoundProps) {
onPress={() => null}
options={bulkActionsButtonOptions}
style={[shouldUseNarrowLayout && styles.flexGrow1]}
isDisabled={!selectedMembers.length}
/>
) : (
<Button
Expand Down
1 change: 1 addition & 0 deletions src/pages/workspace/WorkspaceMembersPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,7 @@ function WorkspaceMembersPage({personalDetails, route, policy, currentUserPerson
options={getBulkActionsButtonOptions()}
isSplitButton={false}
style={[shouldUseNarrowLayout && styles.flexGrow1, shouldUseNarrowLayout && styles.mb3]}
isDisabled={!selectedEmployees.length}
/>
) : (
<Button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ function WorkspaceCategoriesPage({route}: WorkspaceCategoriesPageProps) {
options={options}
isSplitButton={false}
style={[shouldUseNarrowLayout && styles.flexGrow1, shouldUseNarrowLayout && styles.mb3]}
isDisabled={!selectedCategoriesArray.length}
/>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ function PolicyDistanceRatesPage({
style={[shouldUseNarrowLayout && styles.flexGrow1]}
wrapperStyle={styles.w100}
isSplitButton={false}
isDisabled={!selectedDistanceRates.length}
/>
)}
</View>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ function ReportFieldsListValuesPage({
options={options}
isSplitButton={false}
style={[isSmallScreenWidth && styles.flexGrow1, isSmallScreenWidth && styles.mb3]}
isDisabled={!selectedValuesArray.length}
/>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ function WorkspaceReportFieldsPage({
options={options}
isSplitButton={false}
style={[shouldUseNarrowLayout && styles.flexGrow1, shouldUseNarrowLayout && styles.mb3]}
isDisabled={!selectedReportFields.length}
/>
);
}
Expand Down
1 change: 1 addition & 0 deletions src/pages/workspace/tags/WorkspaceTagsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ function WorkspaceTagsPage({route}: WorkspaceTagsPageProps) {
customText={translate('workspace.common.selected', {selectedNumber: selectedTagsArray.length})}
options={options}
style={[shouldUseNarrowLayout && styles.flexGrow1, shouldUseNarrowLayout && styles.mb3]}
isDisabled={!selectedTagsArray.length}
/>
);
};
Expand Down
1 change: 1 addition & 0 deletions src/pages/workspace/tags/WorkspaceViewTagsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ function WorkspaceViewTagsPage({route}: WorkspaceViewTagsProps) {
customText={translate('workspace.common.selected', {selectedNumber: selectedTagsArray.length})}
options={options}
style={[shouldUseNarrowLayout && styles.flexGrow1, shouldUseNarrowLayout && styles.mb3]}
isDisabled={!selectedTagsArray.length}
/>
);
};
Expand Down
1 change: 1 addition & 0 deletions src/pages/workspace/taxes/WorkspaceTaxesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ function WorkspaceTaxesPage({
pressOnEnter
isSplitButton={false}
style={[shouldUseNarrowLayout && styles.flexGrow1, shouldUseNarrowLayout && styles.mb3]}
isDisabled={!selectedTaxesIDs.length}
/>
);

Expand Down
Loading