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

Request AddSortedColumn: Additional functionality? #127

Open
higgsja opened this issue Jan 19, 2023 · 1 comment
Open

Request AddSortedColumn: Additional functionality? #127

higgsja opened this issue Jan 19, 2023 · 1 comment

Comments

@higgsja
Copy link

higgsja commented Jan 19, 2023

I have a series of table column headings to choose from that I want to be displayed in alphabetical order. I can get this to work somewhat.

The issue is that moving items from SelectedGrid to AvailableGrid puts those items at the bottom of the AvailableGrid, sometimes meaning they 'disappear' off the screen from a client perspective.

If I use AddSortableColumn the same thing happens. If the client then clicks the header to sort, all is well. But, that is not entirely intuitive. If you move an item from Available to Selected and back again it should come back to the original position, whatever position that was.

In fact, I deliver the headings pre-sorted thinking items would go and come back to the same place. They do not without some intervention.

There is likely more than one way to solve this. The most flexible might be:

  • Use AddSortableColumn
  • assume that if you use AddSortableColumn you want to sort (otherwise use AddColumn) so eliminate showing the 'as added' view at all while retaining the up/down arrows (showing only selected direction).

People find it confusing to see the 'as added' list when they are really interested in sorting up or down with no interest in the 'as added' order. So, it causes a non-intuitive additional click.

  • or, if a sort direction is not specified, current functionality of showing 'as added' with the up/down arrows

  • add a property, e.g., sortDirection (null, up, down) indicating initial direction of sort, null as default (current functionality)

As noted, there are other possibilities including add an AddSortedColumn feature.

Thanks for considering!

@javier-godoy
Copy link
Member

If you move an item from Available to Selected and back again it should come back to the original position, whatever position that was.

That would be an interesting feature. The current implementation removes items from each Grid when they are moved to the other side, thus the original position is lost when they are moved back. Recently I've been entertaining the idea of filtering the available grid (#130), which now I realize would provide a better solution for this scenario too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Inbox (needs triage)
Development

No branches or pull requests

2 participants