docs: add ClickableTile example, notes on keyed props (#1184)

* docs(clickable-tile): add "Prevent default behavior" example

* docs: add note that `items` object requires a unique `id`

* docs: remove note on selectedId

* docs(data-table): explain how header keys work
This commit is contained in:
metonym 2022-03-19 10:20:34 -07:00 committed by GitHub
commit 233edf3358
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 32 additions and 8 deletions

View file

@ -1,8 +1,14 @@
<script>
import { MultiSelect } from "carbon-components-svelte";
import { MultiSelect, InlineNotification } from "carbon-components-svelte";
import Preview from "../../components/Preview.svelte";
</script>
`MultiSelect` is keyed for performance reasons.
<InlineNotification svx-ignore lowContrast title="Note:" kind="info" hideCloseButton>
<div class="body-short-01">Every <code>items</code> object must have a unique "id" property.</div>
</InlineNotification>
### Default
By default, items will be ordered alphabetically based on the `item.text` value. To prevent this, see [#no-alphabetical-ordering](#no-alphabetical-ordering).