vaadin / web-components

A set of high-quality standards based web components for enterprise web applications. Part of Vaadin 20+
https://vaadin.com/docs/latest/components
470 stars 83 forks source link

fix: do not render hidden combo box items #8181

Closed sissbruecker closed 3 days ago

sissbruecker commented 3 days ago

Since adding the data provider controller to combo box in https://github.com/vaadin/web-components/pull/7044, the component now calls ComboBoxMixin.requestContentUpdate when filtering using a data provider. That method iterates over every item in the overlay, regardless whether visible or hidden, and runs its renderer function: https://github.com/vaadin/web-components/blob/d8772844d1d469094ef26762db90f295ec510ea7/packages/combo-box/src/vaadin-combo-box-mixin.js#L412-L414

That can lead to an issue in the Flow component when using component renderers:

This change fixes the issue by not running the renderer function for hidden items.

Fixes https://github.com/vaadin/flow-components/issues/6810

sonarcloud[bot] commented 3 days ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

vaadin-bot commented 21 hours ago

This ticket/PR has been released with Vaadin 24.6.0.beta1 and is also targeting the upcoming stable 24.6.0 version.