Skip to content

Commit 52c9bfe

Browse files
committed
Add default tags
1 parent 9f4fd90 commit 52c9bfe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

demo/src/app.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ const App = () => {
220220
<Select
221221
isMulti
222222
options={colorOptions}
223+
defaultValue={colorOptions[0]}
223224
placeholder="Select some colors..."
224225
tagColorPalette="purple"
225226
/>
@@ -236,6 +237,7 @@ const App = () => {
236237
isMulti
237238
options={mappedColorOptions}
238239
placeholder="Select some colors..."
240+
defaultValue={mappedColorOptions.slice(0, 3)}
239241
/>
240242
</Field>
241243

@@ -251,6 +253,7 @@ const App = () => {
251253
options={colorOptions}
252254
placeholder="Select some colors..."
253255
tagVariant="outline"
256+
defaultValue={colorOptions.slice(0, 2)}
254257
/>
255258
</Field>
256259

@@ -265,6 +268,7 @@ const App = () => {
265268
isMulti
266269
options={tagVariantOptions}
267270
placeholder="Select some tag variants..."
271+
defaultValue={tagVariantOptions}
268272
/>
269273
</Field>
270274

0 commit comments

Comments
 (0)