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

First datagrid ".header-cell" can select all rows only #27

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Vlczech
Copy link
Contributor

@Vlczech Vlczech commented Mar 24, 2017

Currently, all of ".header-cell"-s select all rows, which is not so practical and not intuitive/user-friendly if user click accidentally outside sort link or sort control button (but I hope, that it is only a bug of bad selector (".headel-cell" instead of ".header-cell:first-of-type" or wrongly placed of first() function ).

Second one was selected as a fix, because usage of .first() is needed in the firstly mentioned possible fix also.

@uestla
Copy link
Owner

uestla commented Mar 24, 2017

It's actually a feature - see tooltips at http://twigrid.1991.cz/group-actions
first() is used to append the "virtual" checkbox to first header cell.

However, I'm planning on changing this behavior. There will be two checkboxes above the table like "select visible" and "select all" and the checking via clicking on header will be removed.

@Vlczech
Copy link
Contributor Author

Vlczech commented Mar 24, 2017

OK, I was surprised, when I clicked on header accidentally and all rows were selected - this was unexpected behavior for me. In my eyes it was a bug, which led me to do this pull request :) However, for me it is more a bug than a feature. If i would like to select all, I click first column. As a feature I don't see any benefit (except a shortcut for lazy mouse shifters) and it does not make sense for me.

It would be better, if should be sort link displayed as block through whole table cell - for better navigation in cell phones and tablets.

@uestla
Copy link
Owner

uestla commented Mar 24, 2017

I see. I kind of like the block sorting buttons, the thing is how to deal with multisort "+" buttons then?

@Vlczech
Copy link
Contributor Author

Vlczech commented Mar 24, 2017

There are many options:

  1. sort-link as block with margin-left to "+" button
  2. some checkbox or radiobox (for example above the table) to change behavior between single sort and multi sort
  3. single sort by default, multisort by click with holding "ctrl" as when selecting each file in OS.
  4. ..maybe other solutions?

BTW: there is a strange behavior of multisorting => #28

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