-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[@mantine/core] TagsInput: Fix
selectFirstOptionOnChange
prop not w…
…orking (#6337) * [@mantine/core] Implement selectFirstOptionOnChange for TagsInput * Fix prettier test * More consistent approach * Prettier again * Revert onChange for TagsInput to remove from diff * Remove selectFirstOptionOnChange from groups demo --------- Co-authored-by: Alex Lapp <[email protected]>
- Loading branch information
Showing
4 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
packages/@docs/demos/src/demos/core/TagsInput/TagsInput.demo.selectFirst.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { TagsInput } from '@mantine/core'; | ||
import { MantineDemo } from '@mantinex/demo'; | ||
|
||
const code = ` | ||
import { TagsInput } from '@mantine/core'; | ||
function Demo() { | ||
return ( | ||
<TagsInput | ||
label="Enter tags" | ||
placeholder="Enter tags" | ||
selectFirstOptionOnChange | ||
data={[ | ||
'Apple', 'Banana', 'Kiwi', 'Mango', 'Watermelon', 'Raspberry', 'Strawberry', | ||
]} | ||
/> | ||
); | ||
} | ||
`; | ||
|
||
function Demo() { | ||
return ( | ||
<TagsInput | ||
label="Enter tags" | ||
placeholder="Enter tags" | ||
selectFirstOptionOnChange | ||
data={['Apple', 'Banana', 'Kiwi', 'Mango', 'Watermelon', 'Raspberry', 'Strawberry']} | ||
/> | ||
); | ||
} | ||
|
||
export const selectFirst: MantineDemo = { | ||
type: 'code', | ||
component: Demo, | ||
code, | ||
maxWidth: 340, | ||
centered: true, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters