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

Default rows selected in datatables #754

Closed
jeffrysteven opened this issue Aug 18, 2016 · 1 comment
Closed

Default rows selected in datatables #754

jeffrysteven opened this issue Aug 18, 2016 · 1 comment
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@jeffrysteven
Copy link

Hi, I tried to pass a default selected rows to datatables and doesn't work never. I found an error in your datatables component because you are comparing two objects (array item of the [(selected)] attribute with all the object of [value] attribute). It is impossible, see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness#A_model_for_understanding_equality_comparisons.

I solved this with string comparisons with the help of JSON.stringify.

I created a pull request with this change: #753

@cagataycivici cagataycivici added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Aug 20, 2016
@cagataycivici cagataycivici added this to the 1.0.0-beta.13 milestone Aug 20, 2016
@cagataycivici cagataycivici self-assigned this Aug 20, 2016
@dereklin
Copy link

@jeffrysteven How do you pass in default selected rows? If the default selected rows are on page 3 of a paginated table, will the table load page 3 automatically?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

3 participants