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

Row is empty on row deselect without multiselect #881

Closed
abauske opened this issue Sep 19, 2017 · 1 comment · Fixed by #896
Closed

Row is empty on row deselect without multiselect #881

abauske opened this issue Sep 19, 2017 · 1 comment · Fixed by #896
Labels
Milestone

Comments

@abauske
Copy link

abauske commented Sep 19, 2017

Do you want to request a feature or report a bug?

bug

Bug Report

When using a data table that is selectable and multiple, on row selection a ITdDataTableSelectEvent is fired. This event contains the row that has been toggled and a boolean value whether you have selected or deselected that row.
If your data table, however, only is selectable and not multiple, then on deselection the row field is blank. Of course it is easy to create a quick fix for it, but I think this is clearly a bug!

See the plunker below to recreate the problem:
click any row -> in console it will print the row you have just clicked on
deselect just selected row -> console will say undefined

Screenshots or link to CodePen/Plunker/JSfiddle

http://plnkr.co/edit/8YSyQPswBDq6X6Tnc35p?p=preview

What is the expected behavior?

I would expect for consistency reasons, that a deselect (just as it does in multiselect mode) provides the row that has been deselected, and in selected field it should say false (as it currently already does).

What is the motivation / use case for changing the behavior?

I have constructed a component that wraps covalent data table and with this bug I have to differ between the two modes (multiselect mode and not), whereas I would like to use the same functionality twice.

@emoralesb05
Copy link
Contributor

Will be fixed with #896

emoralesb05 added a commit that referenced this issue Oct 2, 2017
@emoralesb05 emoralesb05 added this to the Beta 8 milestone Oct 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants