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

[BUG] Data table HTML column labels display as plain text in mobile view #1408

Open
2 tasks done
bgilhome-now opened this issue Dec 12, 2024 · 0 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@bgilhome-now
Copy link
Contributor

Environment

  • Operating System: Darwin
  • Node Version: v18.20.2
  • Nuxt Version: 3.13.2
  • CLI Version: 3.14.0
  • Nitro Version: 2.9.7
  • Package Manager: [email protected]
  • Builder: -
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

  1. Render a data table, set one of the columns' isLabelHTML property to true in the columns object and use HTML in the label.
  2. View the table on desktop - HTML is rendered correctly
  3. View the table on mobile - HTML is rendered as escaped/plain text

Describe the bug

As above - renders plain HTML since it's using CSS content: attr(data-label) in mobile.

I'll take a quick look - could use a SVG data URI with a <foreignElement> tag containing HTML as per this answer: https://stackoverflow.com/a/37558030

Additional context

No response

Logs

No response

Final checks

@bgilhome-now bgilhome-now added the bug Something isn't working label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant