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

render HTML element (url) in table #359

Open
nicoKoehler opened this issue Apr 5, 2024 · 2 comments
Open

render HTML element (url) in table #359

nicoKoehler opened this issue Apr 5, 2024 · 2 comments

Comments

@nicoKoehler
Copy link

Hi all

Love the Easy Table, but one core feature I have not yet figured out. Is there a way to render a url in a column's cells dynamically based on the items provided?
To stick with the basketball example, rendering a URL for each player that links to the ESPN page, like https://www.espn.com/nba/player/_/id/{PLAYER_ID}.

Is this possible? If so, how?

@djplaner
Copy link

G'day,

I'm still a newbie with Easy Table. Not sure how much help this will be.

The item slot example seems to demonstrate one approach to achieve this. Adding in a link for the team, rather than the player.

David.

@nicoKoehler
Copy link
Author

nicoKoehler commented Apr 12, 2024

@djplaner Thanks! Your link links to this very issue :) I figured it out soon after, using a template for the column (similar to how button operation is deployed). Something like this:

<template #item-link="item">
    <a target="_blank" :href="'www.base-url.com/'+item.linkpath">{{ item.linktext }}</a>
</template>

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

2 participants