Skip to content

Commit

Permalink
[@mantine/core] Update docs for Select, MultiSelect, Autocomplete to …
Browse files Browse the repository at this point in the history
…warn about data props consisting of unique values
  • Loading branch information
ustun-ed committed Nov 28, 2024
1 parent c83f5b0 commit 24a076e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export interface AutocompleteProps
Omit<ComboboxLikeProps, 'data'>,
StylesApiProps<AutocompleteFactory>,
ElementProps<'input', 'onChange' | 'size'> {
/** Data displayed in the dropdown */
/** Data displayed in the dropdown. Values must be unique, otherwise an error will be thrown and component will not render. */
data?: ComboboxStringData;

/** Controlled component value */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export type ComboboxParsedItem = ComboboxItem | ComboboxParsedItemGroup;
export type ComboboxLikeStylesNames = Exclude<ComboboxStylesNames, 'header' | 'footer' | 'search'>;

export interface ComboboxLikeProps {
/** Data used to generate options */
/** Data used to generate options. Values must be unique, otherwise an error will be thrown and component will not render. */
data?: ComboboxData;

/** Controlled dropdown opened state */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export interface TagsInputProps
Omit<ComboboxLikeProps, 'data'>,
StylesApiProps<TagsInputFactory>,
ElementProps<'input', 'size' | 'value' | 'defaultValue' | 'onChange'> {
/** Data displayed in the dropdown */
/** Data displayed in the dropdown. Values must be unique, otherwise an error will be thrown and component will not render. */
data?: ComboboxStringData;

/** Controlled component value */
Expand Down

0 comments on commit 24a076e

Please sign in to comment.