Skip to content

Commit

Permalink
make multi-select menu options type immutable
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad committed Sep 11, 2024
1 parent 542f41f commit d395aa0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Components/Form/FormFields/SelectFormField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const SelectFormField = <T, V>(props: SelectFormFieldProps<T, V>) => {

type MultiSelectFormFieldProps<T, V = T> = FormFieldBaseProps<V[]> & {
placeholder?: React.ReactNode;
options: T[];
options: readonly T[];
optionLabel: OptionCallback<T, React.ReactNode>;
optionSelectedLabel?: OptionCallback<T, React.ReactNode>;
optionDescription?: OptionCallback<T, React.ReactNode>;
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Form/MultiSelectMenuV2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type OptionCallback<T, R = void> = (option: T) => R;

type Props<T, V = T> = {
id?: string;
options: T[];
options: readonly T[];
value: V[] | undefined;
placeholder?: ReactNode;
optionLabel: OptionCallback<T, ReactNode>;
Expand Down

0 comments on commit d395aa0

Please sign in to comment.