diff --git a/packages/combo-box/src/vaadin-combo-box-data-provider-mixin.js b/packages/combo-box/src/vaadin-combo-box-data-provider-mixin.js index 8d78abc97c..5333489a5a 100644 --- a/packages/combo-box/src/vaadin-combo-box-data-provider-mixin.js +++ b/packages/combo-box/src/vaadin-combo-box-data-provider-mixin.js @@ -110,7 +110,7 @@ export const ComboBoxDataProviderMixin = (superClass) => this.__dataProviderInitialized = true; if (this.dataProvider) { - this.requestContentUpdate(); + this.__synchronizeControllerState(); } } @@ -166,7 +166,7 @@ export const ComboBoxDataProviderMixin = (superClass) => const { rootCache } = this.__dataProviderController; rootCache.items = [...rootCache.items]; - this.requestContentUpdate(); + this.__synchronizeControllerState(); if (!this.opened && !this._isInputFocused()) { this._commitValue(); @@ -183,7 +183,7 @@ export const ComboBoxDataProviderMixin = (superClass) => this.__dataProviderController.clearCache(); - this.requestContentUpdate(); + this.__synchronizeControllerState(); if (this._shouldFetchData()) { this._forceNextRequest = false; @@ -206,7 +206,7 @@ export const ComboBoxDataProviderMixin = (superClass) => // The controller adds new placeholders to the cache through mutation, // so we need to create a new array to trigger filteredItems observers. rootCache.items = [...rootCache.items]; - this.requestContentUpdate(); + this.__synchronizeControllerState(); } } @@ -224,7 +224,7 @@ export const ComboBoxDataProviderMixin = (superClass) => const { rootCache } = this.__dataProviderController; if (rootCache.items !== items) { rootCache.items = items; - this.requestContentUpdate(); + this.__synchronizeControllerState(); } } } @@ -232,11 +232,11 @@ export const ComboBoxDataProviderMixin = (superClass) => /** * Synchronizes the controller's state with the component, which can be * out of sync after the controller receives new data from the data provider - * or if the state in the controller is directly manupulated. + * or if the state in the controller is directly manipulated. * - * @override + * @private */ - requestContentUpdate() { + __synchronizeControllerState() { // When the data provider isn't initialized, it means the content update was requested // by an observer before the `ready()` callback. In such cases, some properties // in the data provider controller might still be uninitialized, so it's not safe @@ -248,8 +248,6 @@ export const ComboBoxDataProviderMixin = (superClass) => this.filteredItems = rootCache.items; this.loading = this.__dataProviderController.isLoading(); } - - super.requestContentUpdate(); } /** @private */