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

@vaadin/grid

Package Overview
Dependencies
Maintainers
14
Versions
413
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vaadin/grid - npm Package Compare versions

Comparing version 23.2.0-alpha2 to 23.2.0-dev.48e5e3967

20

package.json
{
"name": "@vaadin/grid",
"version": "23.2.0-alpha2",
"version": "23.2.0-dev.48e5e3967",
"publishConfig": {

@@ -46,13 +46,13 @@ "access": "public"

"@polymer/polymer": "^3.0.0",
"@vaadin/checkbox": "23.2.0-alpha2",
"@vaadin/component-base": "23.2.0-alpha2",
"@vaadin/lit-renderer": "23.2.0-alpha2",
"@vaadin/text-field": "23.2.0-alpha2",
"@vaadin/vaadin-lumo-styles": "23.2.0-alpha2",
"@vaadin/vaadin-material-styles": "23.2.0-alpha2",
"@vaadin/vaadin-themable-mixin": "23.2.0-alpha2"
"@vaadin/checkbox": "23.2.0-dev.48e5e3967",
"@vaadin/component-base": "23.2.0-dev.48e5e3967",
"@vaadin/lit-renderer": "23.2.0-dev.48e5e3967",
"@vaadin/text-field": "23.2.0-dev.48e5e3967",
"@vaadin/vaadin-lumo-styles": "23.2.0-dev.48e5e3967",
"@vaadin/vaadin-material-styles": "23.2.0-dev.48e5e3967",
"@vaadin/vaadin-themable-mixin": "23.2.0-dev.48e5e3967"
},
"devDependencies": {
"@esm-bundle/chai": "^4.3.4",
"@vaadin/polymer-legacy-adapter": "23.2.0-alpha2",
"@vaadin/polymer-legacy-adapter": "23.2.0-dev.48e5e3967",
"@vaadin/testing-helpers": "^0.3.2",

@@ -62,3 +62,3 @@ "lit": "^2.0.0",

},
"gitHead": "c9b8113d0fa9a602f8b9cb915c1826355af2e8df"
"gitHead": "961bc4ae5b707c3c02f12b99819b3c12c9b478aa"
}

@@ -16,2 +16,18 @@ /**

multiSort: boolean;
/**
* Controls how columns are added to the sort order when using multi-sort.
* The sort order is visually indicated by numbers in grid sorters placed in column headers.
*
* By default, whenever an unsorted column is sorted, or the sort-direction of a column is
* changed, that column gets sort priority 1, thus affecting the priority for all the other
* sorted columns. This is identical to using `multi-sort-priority="prepend"`.
*
* Using this property allows to change this behavior so that sorting an unsorted column
* would add it to the "end" of the sort, and changing column's sort direction would retain
* it's previous priority. To set this, use `multi-sort-priority="append"`.
*
* @attr {string} multi-sort-priority
*/
multiSortPriority: 'prepend' | 'append';
}

@@ -25,2 +25,21 @@ /**

/**
* Controls how columns are added to the sort order when using multi-sort.
* The sort order is visually indicated by numbers in grid sorters placed in column headers.
*
* By default, whenever an unsorted column is sorted, or the sort-direction of a column is
* changed, that column gets sort priority 1, thus affecting the priority for all the other
* sorted columns. This is identical to using `multi-sort-priority="prepend"`.
*
* Using this property allows to change this behavior so that sorting an unsorted column
* would add it to the "end" of the sort, and changing column's sort direction would retain
* it's previous priority. To set this, use `multi-sort-priority="append"`.
*
* @attr {string} multi-sort-priority
*/
multiSortPriority: {
type: String,
value: 'prepend',
},
/**
* @type {!Array<!GridSorterDefinition>}

@@ -52,2 +71,3 @@ * @protected

e.stopPropagation();
sorter._grid = this;
this.__updateSorter(sorter);

@@ -76,2 +96,22 @@ this.__applySorters();

/** @private */
__appendSorter(sorter) {
if (!sorter.direction) {
this._removeArrayItem(this._sorters, sorter);
} else if (!this._sorters.includes(sorter)) {
this._sorters.push(sorter);
}
this.__updateSortOrders();
}
/** @private */
__prependSorter(sorter) {
this._removeArrayItem(this._sorters, sorter);
if (sorter.direction) {
this._sorters.unshift(sorter);
}
this.__updateSortOrders();
}
/** @private */
__updateSorter(sorter) {

@@ -85,7 +125,7 @@ if (!sorter.direction && this._sorters.indexOf(sorter) === -1) {

if (this.multiSort) {
this._removeArrayItem(this._sorters, sorter);
if (sorter.direction) {
this._sorters.unshift(sorter);
if (this.multiSortPriority === 'append') {
this.__appendSorter(sorter);
} else {
this.__prependSorter(sorter);
}
this.__updateSortOrders();
} else if (sorter.direction) {

@@ -92,0 +132,0 @@ const otherSorters = this._sorters.filter((s) => s !== sorter);

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

this._isConnected = false;
if (!this.parentNode && this._grid) {
this._grid.__removeSorters([this]);
}
}

@@ -181,0 +185,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