livewire-tables icon indicating copy to clipboard operation
livewire-tables copied to clipboard

To provide asc/desc sort icons, and staying style agnostic?

Open coryrose1 opened this issue 4 years ago • 1 comments

Do we attempt to provide sorting and ascending icons for the <th> header cells, outside of ascending and descending classes as referenced in #10 ?

Is it possible to do so and stay "style agnostic"?

coryrose1 avatar Nov 19 '19 19:11 coryrose1

See https://github.com/coryrose1/livewire-tables/issues/10#issuecomment-557793634

If a column is sortable, we can have default asc/desc status icons that are HTML entities and completely agnostic rendered after the column title.

@if ($sortDir == 'asc')
  &nbsp;&#9650;
@elseif ($sortDir == 'desc')
  &nbsp;&#9660;
@endif

Can we somehow have a configuration file option that allows the user to pass either a different HTML entity for asc/desc, or an SVG? However we then need to handle the tags for the SVG, styling, etc.

Any thoughts?

coryrose1 avatar Nov 23 '19 12:11 coryrose1