Skip to content

BTable: the show-empty prop is required for empty-text prop to work #2754

@bperel

Description

@bperel

Describe the bug

It looks reasonable that show-empty is required for the value of the empty-text prop to be shown, however if that's the case the documentation page is a bit misleading: it says

Aside from using empty-text, empty-filtered-text, it is also possible to provide custom rendering for tables that have no data to display using named slots.
In order for these slots to be shown, the show-empty attribute must be set and items must be either falsy or an array of length 0.

The way I read it, show-empty is only required if the slot is specified, but not if the empty-text prop is specified, which is incorrect: show-empty is required whether we specify the empty text through the prop or through the slot.

Reproduction

https://stackblitz.com/edit/github-8kyt3tva-svxv9lsd?file=src%2FApp.vue

Used Package Manager

npm

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions