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

PreSelected Rows after ajax request not working #241

Closed
Heydariiii128 opened this issue Sep 14, 2019 · 3 comments · Fixed by #278
Closed

PreSelected Rows after ajax request not working #241

Heydariiii128 opened this issue Sep 14, 2019 · 3 comments · Fixed by #278
Assignees
Labels
bug Something isn't working

Comments

@Heydariiii128
Copy link

i adding preSelected column to rows and set selectableRowsPreSelectedField="preSelected" but in first time my rows is null because request is ajax call. when request is done and my rows is filled, pre selected not working.

i also test pre select option without ajax call and its work. i check source code and i understand rows must be filled in first time. but the most used for data table is ajax request.

Steps to reproduce the behavior:

  1. selectableRowsPreSelectedField="preSelected"
  2. clearSelectedRows={false}
  3. selectableRows={true}
  4. add preSelected field to all rows
  5. call ajax request for fetch data
  6. get data and set to rows
  7. See rows not selected

Expected behavior

after ajax request is done apply pre selected rows

Thank you for your efforts

@jbetancur
Copy link
Owner

I think you are right in that when data is updated the table is not re-rendering to new pre-selected rows. The initial design intent for this was to be set only once.

I'll need to dig into this a bit more.

@jbetancur
Copy link
Owner

I should have a fix for this in the next day or so, but it seems that the preselected logic is not being handled in TableRow when the data changes

@jbetancur
Copy link
Owner

This is now fixed in 3.6.0!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants