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

Allow "no sorted" Icons & add class for sorted columns & allows to cancel unfinished request #253

Closed
wants to merge 4 commits into from

Conversation

alfonsobries
Copy link

@alfonsobries alfonsobries commented Sep 19, 2017

There are three useful changes, hope you can join them to the next version or at least use as an idea:

  1. Allow "no sorted" Icons
    Allows to optional add a "no sorted" icon, im not sure what icon library u use but in my case i add a double (up and down) chevron icon when the column is not sorted so its more clear for the user that they can sort by clicking the title

  2. Add class for sorted columns
    Useful to add some kind of class for sorted columns so you can add styles for "sorted" columns and make more clear that the content is ordered by this columns

  3. Cancel unfinished request when new request was sended (My favorite, please add this)
    If the user quickly order a row many times, and have an unfinished request sometimes multiple "loadData" request was sended, this use much memory and in some cases the oldest request finish last so the current data is innacurate, this is more problematic with custom filters like a search input where the user type and the data was live refreshed. With this changes if the loadData funcion has a previous unfinished request it cancel it so you only have one request at a time.

PD: Sorry for the "testing" commit

@ratiw
Copy link
Owner

ratiw commented Sep 21, 2017

@alfonsobries Thanks for the PR. It's really appreciated.

  1. The "no sorted" icon is actually been submitted in this PR Add default icon to css #2 #192 as defaultSortIcon and has been merged to the develop branch as sortableIcon.

  2. Class for sorted columns is not need as you can use sortable class to style it the way you added sorted class, so it's redundant.

  3. The cancel request is ok, but please make a separate PR based on the develop branch and re-submit again.

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

Successfully merging this pull request may close these issues.

2 participants