Skip to content

Fixed: grid doesn't refresh when _gridOptions.data is an empty array #24

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

Closed
wants to merge 1 commit into from

Conversation

RickZee
Copy link

@RickZee RickZee commented Feb 17, 2017

Hi,

Please see a fix that would make the grid refresh when you assign empty array to gridOptions.data

Cheers,
Rick

@RickZee
Copy link
Author

RickZee commented Mar 21, 2017

Hi @AlexanderZhukCoherent, would you please let me know when you'll have some time to review this? We'd like to start using the fixed component on our project.

@AlexanderZhukCoherent
Copy link
Contributor

@RickZee Will do by this Friday. At a first glance, your change makes sense, though the condition 'newValue.length > -1' will always be 'true' for any array or string, regardless of the newValue, so it can be eliminated in this case. Will re-review and let you know in the next 3 days, thanks.

@RickZee
Copy link
Author

RickZee commented Mar 21, 2017

Sounds great! Thanks much @AlexanderZhukCoherent

The idea with 'newValue.length > -1' is to also account for the empty array. In that case newValue.length is '0' which is a falsy value but we want to refresh the grid nevertheless. Hopefully this helps. Please let me know if I can help in any way :)

Thanks,
Rick.

@AlexanderZhukCoherent
Copy link
Contributor

fixed in c87e29d

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