github carbon-design-system/carbon-components-svelte v0.24.0

latest releases: v0.89.7, v0.89.6, v0.89.5...
4 years ago

Features

  • Add a HeaderSearch component for the UI Shell that can render user-provided search results (PR #417, issue #395); HeaderActionSearch is deprecated in favor of HeaderSearch

    Demo

     <HeaderSearch
        bind:ref
        bind:active
        bind:value
        bind:selectedResultIndex
        placeholder="Search services"
        results="{results}"
        on:active
        on:inactive
        on:clear
        on:select="{(e) => {
          console.log(e.detail); // { value: string; selectedResultIndex: number; result: HeaderSearchReseult }
        }}"
      />
  • Expand headers prop type in DataTableSkeleton to be consistent with that of the DataTable (PR #415, issue #413)

    Before, you had to map the header value when using the DataTableSkeleton:

    <DataTableSkeleton headers={headers.map(header => header.value)} />

    Now, you can simply reuse the headers supplied to the DataTable component:

    {#if loading}
      <DataTableSkeleton {headers} />
    {:else}
      <DataTable {headers} {rows} />
    {/if}

Fixes

  • Update DataTableRow prop type in DataTable to require an "id" key and value (PR #415, issue #414)

Documentation

Don't miss a new carbon-components-svelte release

NewReleases is sending notifications on new releases.