Skip to content
This repository has been archived by the owner on Sep 26, 2022. It is now read-only.

Commit

Permalink
fix(Select): chips basic and multiple
Browse files Browse the repository at this point in the history
Signed-off-by: Florian-Schoenherr <florian.schoenherr99@gmail.com>
  • Loading branch information
Florian-Schoenherr committed Mar 21, 2021
1 parent 51d1841 commit f9daf57
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions packages/docs/src/examples/Select/chips.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
{ name: 'Fizz', value: 'fizz' },
{ name: 'Buzz', value: 'buzz' },
];
const items2 = ['foo', 'bar', 'fizz', 'buzz'];
</script>

<Row>
Expand All @@ -15,7 +16,7 @@
<Select chips filled {items}>Filled</Select>
</Col>
<Col>
<Select chips multiple {items}>Multiple</Select>
<Select chips outlined {items}>Outlined</Select>
<Select chips multiple items={items}>Multiple</Select>
<Select chips multiple outlined items={items2}>Multiple Outlined</Select>
</Col>
</Row>
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
<div slot="content">
{#if chips && value}
<span class="s-select__chips">
{#each Array.isArray(value) ? value : [value] as v}
<Chip>{v}</Chip>
{#each Array.isArray(value) ? value.map((v) => getSelectString(v)) : [getSelectString(value)] as val}
<Chip>{val}</Chip>
{/each}
</span>
{/if}
Expand Down

0 comments on commit f9daf57

Please sign in to comment.