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

Grid.getDataProvider().refreshAll() length must not be negative #2128

Closed
ziza opened this issue Feb 3, 2021 · 1 comment
Closed

Grid.getDataProvider().refreshAll() length must not be negative #2128

ziza opened this issue Feb 3, 2021 · 1 comment

Comments

@ziza
Copy link

ziza commented Feb 3, 2021

Vaadin 18.0.5
Vaadin 19.0.0.alpha5

After scrolling several records in the grid and then calling "getDataPovider().refreshAll" with a filter that does not return any data, the following exception is thrown:
java.lang.IllegalArgumentException: length must not be negative
at com.vaadin.flow.internal.Range.withLength(Range.java:131) ~[flow-server-6.0.0.alpha5.jar:6.0.0.alpha5]
at com.vaadin.flow.data.provider.DataCommunicator.flush(DataCommunicator.java:1088) ~[flow-data-6.0.0.alpha5.jar:6.0.0.alpha5]`

Steps to reproduce

  1. Run attached example.
  2. Scroll until you see at least 500 records.
  3. Type in the filter field "x" or any other term that does not match any record.
  4. The exception is thrown.

Tested on chrome

log.txt
my-project.zip

a4da867d5d294c01b930e62bff802bb5

@yuriy-fix
Copy link
Contributor

The issue is caused by vaadin/flow#9988.
Closing as a duplicate.

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

No branches or pull requests

2 participants