use table body-cell slot for grid mode #15599
-
|
while using grid-mode, template body-cell-name not inherit to grid mode. All code needs to be added again. it would be great if the body-cell slot could use |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
you should use 'v-slot:item' when you using the 'grid' param |
Beta Was this translation helpful? Give feedback.
-
|
That's better left in devland the slots is already available, however you can use <template #body-cell-status="props">
<component :is="grid ? 'div' : 'q-td'" :props="props">
<q-chip
:color="props.row.status === 'Active' ? 'green': 'red'"
text-color="white"
dense
class="text-weight-bolder"
square
>{{props.row.status}}</q-chip>
</component>
</template> |
Beta Was this translation helpful? Give feedback.
That's better left in devland the slots is already available, however you can use
componentand a qtable wrapper with the implementation to use the same body-cell slots for when changing to grid or vice versa. Here https://codepen.io/metalsadman/pen/ZgKexKSee my comments in the code.