Skip to content

<b-table> empty scoped slot renders unwanted default value #3919

Closed
@Hiws

Description

@Hiws

Describe the bug

If you have a scoped slot with conditional content, for example only showing something if an array has elements.
If the slot is completely empty it will render out the default value, which in this case would be [] which might not be wanted.

Steps to reproduce the bug

  1. Create a table with a scoped slot.
  2. Leave the slot empty or add a v-if
  3. If the v-if is not met and the slot is empty it will display the default content.

Expected behavior

If the v-if is not be and the scoped slot is empty, it should not render anything.

Versions

Libraries:

  • BootstrapVue: 2.0.0-rc.28
  • Bootstrap: 4.3.1
  • Vue: 2.x.x

Demo link

https://codepen.io/Hiws/pen/jONrbGX

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions