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

Support for data provider / lazy loading #657

Closed
heruan opened this issue May 17, 2018 · 14 comments
Closed

Support for data provider / lazy loading #657

heruan opened this issue May 17, 2018 · 14 comments
Labels
epic Big feature that has subtasks

Comments

@heruan
Copy link
Member

heruan commented May 17, 2018

The component page on the Vaadin website mentions support for lazy-loading (and remote filtering) as the first vaadin-combo-box feature:

screen shot 2018-05-17 at 17 11 42

But more than a proper feature, it's just exposing a filter to let another something to replace the items. A proper data provider with pagination support for infinite scrolling (like in vaadin-grid) would be preferable.

Notes

@heruan
Copy link
Member Author

heruan commented Jun 6, 2018

Any feedback on this? Maybe not an high priority for the web component itself, but from the perspective of Java developers trying to port apps from FW8 to Flow this is a quite a blocker when behind a ComboBox there is a huge pool of items and the use of a lazy data provider is mandatory.

@tomivirkki
Copy link
Member

True, combo-box doesn't really have a proper lazy-loading API at the moment. This is a good candidate for an enhancement. Should be aligned with the dataProvider API of the grid.

@mstahv
Copy link
Member

mstahv commented Jun 28, 2018

This is kind of a feature that old Vaadin users assume to be there. I can't consider Vaadin 10 to be ready before our combo-box can handle a large number of options without choking the browser or the network. Please get this done!

@maticpetek
Copy link

Hi,
I totally agree with @mstahv . After 3 productions apps with V8, I started a new project 2 months ago and took V10. Dealing with large data sets was one of the main features we took Vaadin and also paid for subscription. Frankly I didn't even consider this features is missing. Now we have TextField with Grid below to simulate autosuggestion. It really looks strange.

@heruan
Copy link
Member Author

heruan commented Jul 5, 2018

Both this and #88 are evidently the most requested features, but I perceive from various discussions with the team the will to revamp the component code before introducing new features. There are indeed some obscure lines which may scare fellow contributors 😃

Can the team shed some light on the upcoming evolution of this component? Will new features be added to the current code base or there's a revamp taking place before that?

@yuriy-fix yuriy-fix added needs research More information needed to estimate epic Big feature that has subtasks and removed needs research More information needed to estimate labels Aug 16, 2018
@jouni
Copy link
Member

jouni commented Aug 16, 2018

@tomivirkki, do you have a good answer for @heruan? I’m also interested to hear the team’s thoughts about the maintenance of this component, whether it would need a refactor/rewrite before adding more complex features?

Though the API probably won’t see much changes, so from that point of view, if it is reasonable, we could first ship these much-requested features and then start working on the rewrite.

@tomivirkki
Copy link
Member

We're doing some research on how painless it would be to add this feature on top of the current source code. In best case scenario, it wouldn't require bigger changes to the existing source but most of it could be included as a mixin (like in vaadin-grid's case).

@tomivirkki
Copy link
Member

@heruan and @mstahv just to make sure, are you aware of the filteredItems API of <vaadin-combo-box>? It can be used to show any custom options in the combo-box dropdown while bypassing the built-in filtering. Kind of similarly as with Google's search field; you type something into it and get a list of relevant suggestions below the field. In case of <vaadin-combo-box> you can obviously have much more options (the filteredItems array).

Is there some relevant use-case which requires a dedicated lazy data provider API and which can't be covered with filteredItems API?

@mstahv
Copy link
Member

mstahv commented Aug 21, 2018

I'm here only as the Flow team told they need it first for the web component ;-) I guess selecting a person from a large set is a good example. So large set that it don't make sense to send them all to the browser at once.

@jouni
Copy link
Member

jouni commented Aug 22, 2018

@tomivirkki, I think the use case Matti describes would be difficult to implement. You would need to maintain the selected item’s ID/index somewhere and then, when the user clicks the combo box open, fetch the correct page of items (which contains the selected item), while still making sure the combo box dropdown shows the scroll position correctly.

Just to make it clear: combo box is different than autocomplete.

@heruan
Copy link
Member Author

heruan commented Aug 23, 2018

@tomivirkki I'm aware of the filtering capabilities, which can restrict the loaded number of items, but we are facing cases where the filter returns many items so the data transfer is still an issue. Scrolling the dropdown should paginate the items like it is in <iron-list> I'd say.

In my experience, I've noticed some users expect to be able to scroll a combo box to find the desired item without typing anything.

@web-padawan
Copy link
Member

Released in https://github.com/vaadin/vaadin-combo-box/releases/tag/v4.2.0-alpha4

@maticpetek
Copy link

Hi,
Is it possible to test and use this feature with V11 Java? Or when can we expected to bi in V11 Java? Thank you.

@web-padawan
Copy link
Member

@maticpetek the progress on Java version can be tracked at vaadin/vaadin-combo-box-flow#131

We hope to manage to release 4.2.0 stable version to in few weeks so that it could be included in V12, which will enter a beta stage in the early November.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic Big feature that has subtasks
Projects
None yet
Development

No branches or pull requests

7 participants