question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

body-cell-[name] slot should have precedence over body-cell slot

See original GitHub issue

First of all, thank you for great framework. 🙏

Describe the bug It is common that more specific things have precedence over general ones… see CSS rules for example, and it makes sense why it is so. Therefore I would expect also same for cell slots, named one should be applied over general one. This is not happening and solving it makes a lot of extra code and effort. I want to have some basic template for cell “body-cell slot” and in some cases, for some columns I need to override this by body-cell-[name] slot. It is not happening currently.

Codepen/jsFiddle/Codesandbox (required) https://codepen.io/luckylooke/pen/PoZwqeB

To Reproduce

  • see the template, both slots are specified
  • see the result, only general one is applied

Expected behavior template v-slot:body-cell-name to be applied for “name” column cells

Platform (please complete the following information): any, codepen is platform agnostic I think

Additional context I expect that same happen for header cells and should be corrected too.

I am willing to try to make MR during the weekend once one of the framework representatives will agree with the change.

Thank you, happy coding 👍

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
rstoenescucommented, Jun 5, 2020

Enhancement will be available in “quasar” v1.12.4.

1reaction
dariodepaoliscommented, Jun 10, 2020

Thank you for this enhancement, just a quick info related to this: Now I can customize all the cells and a single cell in particular, but only the Q-TD. If I need to customize the Q-TR (for a handling a click event for example) at this moment I can do this using the body slot, but this will override the other slots.

Is there a way to customize cells with their slot and at the same time customize the TR without rewriting all the body?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Table: Body-cell slot - Quasar Playground - CodePen
About the <head>. In CodePen, whatever you write in the HTML editor is what goes within the <body> tags in a basic HTML5...
Read more >
Table | Quasar Framework
Total customization of rows and cells through scoped slots; Ability to add additional row(s) at top or bottom of data rows; Column picker...
Read more >
'Unrecognized Slot name' error on v-slot:header declaration
This is a correct behavior as far as I can see. The slot names are validated in 212, and you don't have any...
Read more >
Table | Components - BootstrapVue
Events or slots that include the column field data will be in the normalized ... or the named slot table-caption (the slot takes...
Read more >
'v-slot' directive doesn't support any modifier - Stack Overflow
I did not know you could do this! We have these warnings on several pages and this makes my OCD just a little...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found