ratiw / vue-table

data table simplify! -- vuetable is a Vue.js component that will automatically request (JSON) data from the server and display them nicely in html table with swappable/extensible pagination component.
MIT License
1.83k stars 303 forks source link

passing custom attributes to a column or row #117

Open jaketoolson opened 8 years ago

jaketoolson commented 8 years ago

I'd like to add custom html attributes to a tr or td element. Is this possible?

ratiw commented 8 years ago

@jaketoolson Sorry, you can't. But out of curiosity, why would you want to do that?

jaketoolson commented 8 years ago

@ratiw It gives me more control like data-toggle="tooltip" or data-id="id" just stuff like this.

ratiw commented 8 years ago

@jaketoolson It's not possible on the tr or td level. You many need to consider using CSS tooltip for that work instead.

The only control that allows you can do that is the extra option of __actions special field.

You can also use __component special field to do that as you will have total control over its template.

simonbaker commented 8 years ago

How can I add an attribute of "title" to td element??

ratiw commented 8 years ago

@simonbaker Sorry, you cannot. It is not supported.

simonbaker commented 8 years ago

ok.I may use jquery to help.Thanks.

Nisthar commented 7 years ago

@ratiw @jeroenherczeg @simonbaker I think you can use callback option on the columns and return a custom tag with title attribute. But the title attribute will be on new tag instead of the or .