-
Notifications
You must be signed in to change notification settings - Fork 9
ComboBox does not lazy load items between from server to client #72
Comments
Also with lazy loading it would make a lot of sense to add API to directly configure a link between user filter text and DataProvider filtering. So that the developer only has to provide a converter "filter string" -> "data provider filter". |
This is the way it has been implemented in FW8, and should probably be implemented in exactly the same way in Flow as well. Relevant API from FW8 are:
|
Getting a bit confused: does the ticket this one's waiting for already exist? In the Web Component issues I've found this ones: vaadin/vaadin-combo-box#26, vaadin/vaadin-combo-box#260 but they're both quite old and closed, so maybe they refer to a lazy-something else! This is quite a blocking issue for porting FW8 |
@heruan, there are two related issues:
|
Thank you @lightoze for the issue references. What I don't get is: does this feature (lazy loading) depend also on development in the Web Component side? Or is it just about Java implementation (including a connector)? |
@heruan, it depends on web component support. Note: it is already possible to implement server-side filtering for user input and limit number of results visible to a user. This will prevent attempts to load thousands of items at once but it will be impossible to have an scroll through them like you do now in Vaadin 8. User will have to type in a sufficiently narrow filter text before being able to see target item. |
@lightoze you mean with |
The web component would need a similar data provider API as the |
@pleku I've opened vaadin/vaadin-combo-box#657 to keep track on this on the web component side. |
At the moment there is much confusion about this, since it's not an actual bug but more of a broken promise:
If lazy loading isn't going to happen very soon, I'd strongly suggest to update the component page and temporarily do not implement |
|
@lightoze said
I wish I could, but addFilterChangeListener(..) is protected. |
Any update about this? Just a clarification: which ticket does the "awaits another ticket" label refer to? |
Giovanni I think your issue is the one: vaadin/vaadin-combo-box#657 Since it is a major feature regression between V8 and V10, it should get priority and thus I'm optimistic about getting it done for and shipped in V12 |
Thank you @pleku! I asked because I created the issue after this was labelled so I wasn't sure if that was the right one 😄 I'm glad to hear this has hight priority, since the feature was taken for granted during 8-to-10 port analysis and it blasted out only during demos. I really hope we can get a prerelease before 12 🙂 |
- Items are loaded lazily one page at a time as the user scrolls down the overlay - Added `ItemFilter` API for defining custom server-side filtering function - This is different from V8 `CaptionFilter`, to allow filtering based on other properties than just the caption/label. It is useful especially when using more properties in the renderer. - When the size of the data set is less than pageSize, and the user has not defined a server-side filter function, the filtering will happen in the client-side, providing smoother user experience and reducing network traffic - Server-side filtering is debounced by 500ms to avoid sending requests and triggering server-side filtering all the time as the user types into the field - Default pageSize is 50 - Breaking changes: - `setFilteredItems` and `getFilteredItems` API removed - Use `ItemFilter` instead to implement custom filtering - `setNullRepresentation` and `getNullRepresentation` API removed - DataProvider doesn't allow null items in the data - It makes null value ambiguous: Should `setValue(null)` clear the value or the select the null item? - Calling `setValue` with an item which is not included in the data set doesn't throw an exception anymore - With large data sets, or a callback data provider connected to a database, it's not feasible to figure out whether an item is included Resolves tickets #72 #17
When using
ComboBox
with a huge backend data pool, I want the items to be lazily loaded based on the query string the user's typing, so that I avoid unnecessary consumption of memory/memory exhaustion.ComboBox
already implementsHasDataProvider
, but currently it loads the items eagerly:The Web Component already support lazy loading:—
https://vaadin.com/components/vaadin-combo-boxUpdate The Web Component does not support lazy loading, at least not with a data provider like grid. I suppose then this will depend on support in the Web Component side first!
The text was updated successfully, but these errors were encountered: