Skip to content
Discussion options

You must be logged in to vote

That's better left in devland the slots is already available, however you can use component and 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/ZgKexK
See my comments in the code.

   <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>

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ryhn
Comment options

Answer selected by metalsadman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants