Skip to content

Commit 5f1cc53

Browse files
committed
refactor: add BulkSelectSource type
1 parent 1ab1545 commit 5f1cc53

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`;
@@ -118,7 +121,7 @@ export const BulkSelect: FC<BulkSelectProps> = ({
118121
const onToggleClick = () => setOpen(!isOpen);
119122

120123
return (
121-
(<Dropdown
124+
<Dropdown
122125
shouldFocusToggleOnSelect
123126
ouiaId={`${ouiaId}-dropdown`}
124127
onSelect={(_e, value) => {
@@ -162,7 +165,7 @@ export const BulkSelect: FC<BulkSelectProps> = ({
162165
{...props}
163166
>
164167
<DropdownList {...dropdownListProps}>{splitButtonDropdownItems}</DropdownList>
165-
</Dropdown>)
168+
</Dropdown>
166169
);
167170
};
168171

0 commit comments

Comments
 (0)