Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vaadin/vaadin-combo-box

Package Overview
Dependencies
Maintainers
16
Versions
304
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vaadin/vaadin-combo-box - npm Package Compare versions

Comparing version 5.4.1 to 5.4.2

2

package.json

@@ -13,3 +13,3 @@ {

"name": "@vaadin/vaadin-combo-box",
"version": "5.4.1",
"version": "5.4.2",
"main": "vaadin-combo-box.js",

@@ -16,0 +16,0 @@ "author": "Vaadin Ltd",

@@ -212,2 +212,6 @@ /**

this.filteredItems = filteredItems;
// Cleans up the redundant pending requests for pages > size
// Refers to https://github.com/vaadin/vaadin-flow-components/issues/229
this._flushPendingRequests(size);
}

@@ -259,2 +263,28 @@

/**
* This method cleans up the page callbacks which refers to the
* non-existing pages, i.e. which item indexes are greater than the
* changed size.
* This case is basically happens when:
* 1. Users scroll fast to the bottom and combo box generates the
* redundant page request/callback
* 2. Server side uses undefined size lazy loading and suddenly reaches
* the exact size which is on the range edge
* (for default page size = 50, it will be 100, 200, 300, ...).
* @param size the new size of items
* @private
*/
_flushPendingRequests(size) {
if (this._pendingRequests) {
const lastPage = Math.ceil(size / this.pageSize);
const pendingRequestsKeys = Object.keys(this._pendingRequests);
for (let reqIdx = 0; reqIdx < pendingRequestsKeys.length; reqIdx++) {
const page = parseInt(pendingRequestsKeys[reqIdx]);
if (page >= lastPage) {
this._pendingRequests[page]([], size);
}
}
}
}
};

@@ -232,3 +232,3 @@ /**

static get version() {
return '5.4.1';
return '5.4.2';
}

@@ -235,0 +235,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc