Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(component): DataTable #14

Closed
8 tasks done
metonym opened this issue Dec 18, 2019 · 2 comments
Closed
8 tasks done

feat(component): DataTable #14

metonym opened this issue Dec 18, 2019 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@metonym
Copy link
Collaborator

metonym commented Dec 18, 2019

Supported

  • DataTable (read-only, sortable)
  • DataTableSkeleton
  • Expandable DataTable + batch expansion
  • Selectable DataTable + batch selection
  • Radio DataTable
  • Table toolbar (TableToolbar #349 )
  • Toolbar action menu
  • Empty columns

No plans to support

  • Filterable ToolbarSearch: opt-in filtering behavior where the value from Search filters the current rows supplied to the DataTable
    • IMO, any row filtering logic should be deferred to the consumer.
@metonym metonym added the enhancement New feature or request label Dec 18, 2019
@metonym metonym changed the title feat(component): DataTable, DataTableSkeleton feat(component): DataTable Dec 18, 2019
@metonym metonym self-assigned this Jan 3, 2020
@hovancik
Copy link

hovancik commented Feb 1, 2020

Would nice to be able to have HTML (ie. a ) in rows

@metonym
Copy link
Collaborator Author

metonym commented Oct 24, 2020

@hovancik This is a belated follow up but it's now possible with slotted cells (#342):

<DataTable
  headers="{[
    { key: "name", value: "Name" },
    { key: "protocol", value: "Protocol" },
    { key: "port", value: "Port" },
    { key: "rule", value: "Rule" }
  ]}"
  rows="{[
    {
      id: "a",
      name: "Load Balancer 3",
      protocol: "HTTP",
      port: 3000,
      rule: "Round robin"
    },
    {
      id: "b",
      name: "Load Balancer 1",
      protocol: "HTTP",
      port: 443,
      rule: "Round robin"
    },
    {
      id: "c",
      name: "Load Balancer 2",
      protocol: "HTTP",
      port: 80,
      rule: "DNS delegation"
    },
    {
      id: "d",
      name: "Load Balancer 6",
      protocol: "HTTP",
      port: 3000,
      rule: "Round robin"
    },
    {
      id: "e",
      name: "Load Balancer 4",
      protocol: "HTTP",
      port: 443,
      rule: "Round robin"
    },
    {
      id: "f",
      name: "Load Balancer 5",
      protocol: "HTTP",
      port: 80,
      rule: "DNS delegation"
    },
  ]}"
>
  <span slot="cell" let:row let:cell>
    {#if cell.key === 'rule' && cell.value === 'Round robin'}
      <Link inline href="https://en.wikipedia.org/wiki/Round-robin_DNS" target="_blank">{cell.value}</Link>
    {:else}
      {cell.value}
    {/if}
  </span>
</DataTable>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants