From dd98960b2ca417dda9ae1c5d64819043272bd957 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=9Cst=C3=BCn=20=C3=96zg=C3=BCr?= Date: Thu, 28 Nov 2024 13:54:45 +0300 Subject: [PATCH] [mantine.dev] Update `data` prop description to emphasize unique values requirement (#7181) --- .../@mantine/core/src/components/Autocomplete/Autocomplete.tsx | 2 +- .../@mantine/core/src/components/Combobox/Combobox.types.ts | 2 +- packages/@mantine/core/src/components/TagsInput/TagsInput.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/@mantine/core/src/components/Autocomplete/Autocomplete.tsx b/packages/@mantine/core/src/components/Autocomplete/Autocomplete.tsx index bcbe82d0db8..e9a672fb620 100644 --- a/packages/@mantine/core/src/components/Autocomplete/Autocomplete.tsx +++ b/packages/@mantine/core/src/components/Autocomplete/Autocomplete.tsx @@ -33,7 +33,7 @@ export interface AutocompleteProps Omit, StylesApiProps, 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 */ diff --git a/packages/@mantine/core/src/components/Combobox/Combobox.types.ts b/packages/@mantine/core/src/components/Combobox/Combobox.types.ts index 089f88b1d31..16008bafdea 100644 --- a/packages/@mantine/core/src/components/Combobox/Combobox.types.ts +++ b/packages/@mantine/core/src/components/Combobox/Combobox.types.ts @@ -32,7 +32,7 @@ export type ComboboxParsedItem = ComboboxItem | ComboboxParsedItemGroup; export type ComboboxLikeStylesNames = Exclude; 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 */ diff --git a/packages/@mantine/core/src/components/TagsInput/TagsInput.tsx b/packages/@mantine/core/src/components/TagsInput/TagsInput.tsx index cbc7e6e1138..c6d075ea7a5 100644 --- a/packages/@mantine/core/src/components/TagsInput/TagsInput.tsx +++ b/packages/@mantine/core/src/components/TagsInput/TagsInput.tsx @@ -45,7 +45,7 @@ export interface TagsInputProps Omit, StylesApiProps, 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 */