Skip to content

Commit 7aad141

Browse files
committed
docs(multi-select): add invalid/warning filterable examples
1 parent 1a04817 commit 7aad141

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

docs/src/pages/components/MultiSelect.svx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,16 @@ Indicate an invalid selection by setting `invalid` to `true`. This example shows
182182
{id: "2", text: "Fax"}]}"
183183
/>
184184

185+
## Invalid state (filterable)
186+
187+
Combine `filterable` and `invalid` to show validation errors on a filterable multi-select.
188+
189+
<MultiSelect filterable invalid invalidText="A contact method is required" labelText="Contact" placeholder="Filter contact methods..."
190+
items="{[{id: "0", text: "Slack"},
191+
{id: "1", text: "Email"},
192+
{id: "2", text: "Fax"}]}"
193+
/>
194+
185195
## Warning state
186196

187197
Indicate a warning state by setting `warn` to `true`. This example shows a warning about unassociated accounts.
@@ -192,6 +202,16 @@ Indicate a warning state by setting `warn` to `true`. This example shows a warni
192202
{id: "2", text: "Fax"}]}"
193203
/>
194204

205+
## Warning state (filterable)
206+
207+
Combine `filterable` and `warn` to show warnings on a filterable multi-select.
208+
209+
<MultiSelect filterable warn warnText="One or more contact methods are not associated with your account" labelText="Contact" placeholder="Filter contact methods..."
210+
items="{[{id: "0", text: "Slack"},
211+
{id: "1", text: "Email"},
212+
{id: "2", text: "Fax"}]}"
213+
/>
214+
195215
## Disabled state
196216

197217
Disable the entire dropdown by setting `disabled` to `true`. This prevents all user interaction.

0 commit comments

Comments
 (0)