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
412
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.0.0-beta3 to 23.0.0-beta4

18

package.json
{
"name": "@vaadin/grid",
"version": "23.0.0-beta3",
"version": "23.0.0-beta4",
"publishConfig": {

@@ -44,12 +44,12 @@ "access": "public"

"@polymer/polymer": "^3.0.0",
"@vaadin/checkbox": "23.0.0-beta3",
"@vaadin/component-base": "23.0.0-beta3",
"@vaadin/text-field": "23.0.0-beta3",
"@vaadin/vaadin-lumo-styles": "23.0.0-beta3",
"@vaadin/vaadin-material-styles": "23.0.0-beta3",
"@vaadin/vaadin-themable-mixin": "23.0.0-beta3"
"@vaadin/checkbox": "23.0.0-beta4",
"@vaadin/component-base": "23.0.0-beta4",
"@vaadin/text-field": "23.0.0-beta4",
"@vaadin/vaadin-lumo-styles": "23.0.0-beta4",
"@vaadin/vaadin-material-styles": "23.0.0-beta4",
"@vaadin/vaadin-themable-mixin": "23.0.0-beta4"
},
"devDependencies": {
"@esm-bundle/chai": "^4.3.4",
"@vaadin/polymer-legacy-adapter": "23.0.0-beta3",
"@vaadin/polymer-legacy-adapter": "23.0.0-beta4",
"@vaadin/testing-helpers": "^0.3.2",

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

},
"gitHead": "4c87216666541f9eb58f56c475964727822aad53"
"gitHead": "d0b447f1c31ca4256a5e26f2dcd27784447ff79b"
}

@@ -105,2 +105,8 @@ /**

/**
* Path to an item sub-property that indicates whether the item has child items.
* @attr {string} item-has-children-path
*/
itemHasChildrenPath: string;
/**
* Path to an item sub-property that identifies the item.

@@ -107,0 +113,0 @@ * @attr {string} item-id-path

@@ -190,2 +190,11 @@ /**

/**
* Path to an item sub-property that indicates whether the item has child items.
* @attr {string} item-has-children-path
*/
itemHasChildrenPath: {
type: String,
value: 'children'
},
/**
* Path to an item sub-property that identifies the item.

@@ -192,0 +201,0 @@ * @attr {string} item-id-path

@@ -219,10 +219,8 @@ /**

// TODO: A tree toggle component should not be the way to determine if the row is expandable
/** @private */
__isRowExpandable(row) {
const treeToggle = [...row.children].reduce(
(value, cell) => value || cell._content.querySelector('vaadin-grid-tree-toggle'),
null
);
return treeToggle && !treeToggle.expanded && !treeToggle.leaf;
if (this.itemHasChildrenPath) {
const item = row._item;
return item && this.get(this.itemHasChildrenPath, item) && !this._isExpanded(item);
}
}

@@ -229,0 +227,0 @@

@@ -31,2 +31,3 @@ /**

* @attr {string} item-has-children-path
* @deprecated Use `grid.itemHasChildrenPath` instead.
*/

@@ -33,0 +34,0 @@ itemHasChildrenPath: string | null | undefined;

@@ -37,6 +37,7 @@ /**

* @attr {string} item-has-children-path
* @deprecated Use `grid.itemHasChildrenPath` instead.
*/
itemHasChildrenPath: {
type: String,
value: 'children'
observer: '_itemHasChildrenPathChanged'
}

@@ -72,3 +73,3 @@ };

toggle.expanded = expanded;
toggle.leaf = this.__isLeafItem(item, this.itemHasChildrenPath);
toggle.leaf = this.__isLeafItem(item, this._grid.itemHasChildrenPath);
toggle.textContent = this.__getToggleContent(this.path, item);

@@ -89,2 +90,15 @@ toggle.level = level;

/** @private */
_itemHasChildrenPathChanged(itemHasChildrenPath) {
if (itemHasChildrenPath) {
console.warn(
`WARNING: Since Vaadin 23, itemHasChildrenPath on <vaadin-grid-tree-column> is deprecated. Please set this property on the <vaadin-grid> instead.`
);
if (this._grid) {
this._grid.itemHasChildrenPath = itemHasChildrenPath;
}
}
}
/**

@@ -91,0 +105,0 @@ * Expands or collapses the row once the tree toggle is switched.

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