Kyslik / column-sortable

Package for handling column sorting in Laravel 5/6/7/8
MIT License
644 stars 105 forks source link

Override base URL on @sortablelink #155

Closed Healyhatman closed 3 years ago

Healyhatman commented 4 years ago

My use case involves AJAX and I need the sortablelink to point to the refreshTable url instead of the index url. Is that a possibility? Thanks

Healyhatman commented 4 years ago

PR #156 .

wxyzsupermod commented 4 years ago

@Healyhatman I am attempting to do something similar right now with using ajax and sorting could you post and example of how to use this as the docs have not been updated yet.

Healyhatman commented 4 years ago

Docs haven't been updated because he hasn't accepted the pull request. But mine looks like this

@sortablelink('date', 'Date', null, ['class' => 'ajax no-submit', 'data-refresh_area' => 'timesheets-list'], route('worker-timesheets.refresh'))

Ajax then reloads the data-refresh_area using the url.

Healyhatman commented 3 years ago

I merged in my PR so this can be closed