Skip to content

Commit 5061bfa

Browse files
committed
refactor: add BulkSelectSource type
1 parent fef7412 commit 5061bfa

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

packages/module/src/BulkSelect/BulkSelect.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,12 @@ export const BulkSelectValue = {
2323
export type BulkSelectValue = (typeof BulkSelectValue)[keyof typeof BulkSelectValue];
2424

2525
export const BulkSelectSource = {
26-
dropdown: 'dropdown',
27-
checkbox: 'checkbox'
28-
} as const;
26+
dropdown: 'dropdown',
27+
checkbox: 'checkbox'
28+
} as const;
29+
30+
export type BulkSelectSource = (typeof BulkSelectSource)[keyof typeof BulkSelectSource];
31+
2932
const defaultSelectPageLabel = (pageCount?: number) => `Select page${pageCount ? ` (${pageCount})` : ''}`;
3033
const defaultSelectAllLabel = (totalCount?: number) => `Select all${totalCount ? ` (${totalCount})` : ''}`;
3134
const defaultSelectedLabel = (selectedCount: number) => `${selectedCount} selected`;
@@ -123,7 +126,7 @@ export const BulkSelect: FC<BulkSelectProps> = ({
123126
const onToggleClick = () => setOpen(!isOpen);
124127

125128
return (
126-
(<Dropdown
129+
<Dropdown
127130
shouldFocusToggleOnSelect
128131
ouiaId={`${ouiaId}-dropdown`}
129132
onSelect={(_e, value) => {
@@ -167,7 +170,7 @@ export const BulkSelect: FC<BulkSelectProps> = ({
167170
{...props}
168171
>
169172
<DropdownList {...dropdownListProps}>{splitButtonDropdownItems}</DropdownList>
170-
</Dropdown>)
173+
</Dropdown>
171174
);
172175
};
173176

0 commit comments

Comments
 (0)