vue3-easy-data-table icon indicating copy to clipboard operation
vue3-easy-data-table copied to clipboard

How to access item slot for variable column names

Open thepurpleblob opened this issue 1 year ago • 1 comments
trafficstars

If that makes sense...

My column headers change according to the data, dynamically.

However, I'd like to target certain columns where I don't know the name of the slot at coding time. So, I want to do

<template #item-<SOME_VARIABLE_NAME>

Is this possible?

thepurpleblob avatar Jan 30 '24 12:01 thepurpleblob

Almost immediately answering my own question by reading the docs

<template v-slot=[slotname]>

Elsewhere...

const slotname = 'item-' + some_variable_name;

(Dynamic arguments which was new to me)

thepurpleblob avatar Jan 30 '24 12:01 thepurpleblob