Closed flatcapco closed 1 month ago
I don’t get the point. What do you want to achieve ?
Sorry for the bad explanation.
My understanding is that the x-table link sets a link on every cell of the table using a href.
I like this feature but would like certain cells to have no links set if defined.
At the moment if I use the cell scope to add a link around some data like..
@scope('cell_example', $rate)
<a href="custom_link">{{ $xxx}}</a>
@endscope
Then what actually happens is the html renders like this
<a href="original row link"></a>
<a href="custom_link">xxx</a>
ie it makes 2 hrefs because the row is trying to set a href and because a href cannot sit inside a href it spits out the desired href underneath and messes with the formatting
Your suggestion is about including a change on headers.
But we are talking about rows here, right ?
I can’t think a smart approach to conditionally determine if a row would have a link or not.
You can try an alternative approach:
Don’t use link for rows, but @row-click event. So you can determine your navigation logic through Livewire.
If you have a better approach let me know.
@flatcapco Does #594 solve your problem?
This PR disable link for specifics columns, not rows.
@robsontenorio yep thats all that is needed thank you
My understanding is at present the only way to handle it is with a custom cell and disabling link off the main table and adding it back in manually on cells?
To help minimise repeated code it'd be really nice to handle if a cell was subject to being wrapped as a link when using the tables link attribute.
ie link being used here:
could then be excluded from the headers table like so: