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

b-card header-html doesn't work #5038

Labels
Status: Fixed / Implemented Issue fixed by a new release Type: Bug

Comments

@mariusa
Copy link
Contributor

mariusa commented Mar 29, 2020

Describe the bug

According to
https://bootstrap-vue.org/docs/components/card/#comp-ref-b-card-header

this should render a card with header:

<b-card header-html='<b>strong</b> title'>
test
</b-card>

Steps to reproduce the bug

  1. see code above
  2. result: card without a header

Expected behavior

Render a card with header

Versions

Libraries:

  • BootstrapVue: 2.2.2
  • Bootstrap: 4.4.1
  • Vue: 2.6.11

Additional context

I also tried headerHTML, per
3c6ba3e
and
headerHtml, per
https://github.com/bootstrap-vue/bootstrap-vue/search?q=headerHTML&type=

None of these work.

<div slot="header">...</div> does work.

Thanks

@Hiws
Copy link
Member

Hiws commented Mar 29, 2020

Looks like both the footer-html and header-html props require the header or footer props to be present before working.
Quite an odd bug.

The content placed inside the header or footer props will be overridden by their HTML counterparts.

This wont render the header or footer

<b-card
        header-html="<b>strong</b> title" 
        footer-html="<b>strong</b> footer">
test
</b-card>

This will render the header and footer with the content of the HTML props.

<b-card 
        header=" "
        footer=" "
        header-html="<b>strong</b> title" 
        footer-html="<b>strong</b> footer">
test
</b-card>

jacobmllr95 added a commit that referenced this issue Mar 29, 2020
…ixes #5038) (#5039)

Fixes #5038

Co-authored-by: Jacob Müller <jacob.mueller.elz@gmail.com>
@tmorehouse tmorehouse added the Status: Fixed / Implemented Issue fixed by a new release label May 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment