chore(Table): handle empty-state

Resolves #243
This commit is contained in:
Benjamin Canac
2023-05-31 18:30:49 +02:00
parent 8bdb8c45f7
commit 2966373a86
5 changed files with 78 additions and 3 deletions

View File

@@ -449,6 +449,40 @@ const selected = ref([people[1]])
```
::
### Empty
Use the `empty-state` prop to display a message when there are no results.
You can pass an `object` through the `empty-state` prop or globally through `ui.table.default.emptyState`.
You can also set it to `null` to hide the empty state.
::component-card
---
padding: false
overflowClass: 'overflow-x-auto'
baseProps:
class: 'w-full'
columns:
- key: 'id'
label: 'ID'
- key: 'name'
label: 'Name'
- key: 'title'
label: 'Title'
- key: 'email'
label: 'Email'
- key: 'role'
label: 'Role'
props:
emptyState:
icon: 'i-heroicons-circle-stack-20-solid'
label: "No items."
excludedProps:
- emptyState
---
::
## Props
:component-props