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

How to access item slot for variable column names #352

Open
thepurpleblob opened this issue Jan 30, 2024 · 1 comment
Open

How to access item slot for variable column names #352

thepurpleblob opened this issue Jan 30, 2024 · 1 comment

Comments

@thepurpleblob
Copy link

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
Copy link
Author

thepurpleblob commented Jan 30, 2024

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant