@vaadin/grid
Advanced tools
Comparing version 24.4.0-alpha18 to 24.4.0-alpha19
{ | ||
"name": "@vaadin/grid", | ||
"version": "24.4.0-alpha18", | ||
"version": "24.4.0-alpha19", | ||
"publishConfig": { | ||
@@ -49,10 +49,10 @@ "access": "public" | ||
"@polymer/polymer": "^3.0.0", | ||
"@vaadin/a11y-base": "24.4.0-alpha18", | ||
"@vaadin/checkbox": "24.4.0-alpha18", | ||
"@vaadin/component-base": "24.4.0-alpha18", | ||
"@vaadin/lit-renderer": "24.4.0-alpha18", | ||
"@vaadin/text-field": "24.4.0-alpha18", | ||
"@vaadin/vaadin-lumo-styles": "24.4.0-alpha18", | ||
"@vaadin/vaadin-material-styles": "24.4.0-alpha18", | ||
"@vaadin/vaadin-themable-mixin": "24.4.0-alpha18", | ||
"@vaadin/a11y-base": "24.4.0-alpha19", | ||
"@vaadin/checkbox": "24.4.0-alpha19", | ||
"@vaadin/component-base": "24.4.0-alpha19", | ||
"@vaadin/lit-renderer": "24.4.0-alpha19", | ||
"@vaadin/text-field": "24.4.0-alpha19", | ||
"@vaadin/vaadin-lumo-styles": "24.4.0-alpha19", | ||
"@vaadin/vaadin-material-styles": "24.4.0-alpha19", | ||
"@vaadin/vaadin-themable-mixin": "24.4.0-alpha19", | ||
"lit": "^3.0.0" | ||
@@ -69,3 +69,3 @@ }, | ||
], | ||
"gitHead": "7d675c61eaa32ef50c07de7b2fea19ff437b6b90" | ||
"gitHead": "5fad5eb53de7da69c1a19776a11ba74ceba27ea0" | ||
} |
@@ -240,9 +240,22 @@ /** | ||
} | ||
const cell = this.shadowRoot.elementFromPoint(x, y); | ||
const elementFromPoint = this.shadowRoot.elementFromPoint(x, y); | ||
this.$.scroller.toggleAttribute('no-content-pointer-events', false); | ||
// Make sure the element is actually a cell | ||
if (cell && cell._column) { | ||
return cell; | ||
return this._getCellFromElement(elementFromPoint); | ||
} | ||
/** @private */ | ||
_getCellFromElement(element) { | ||
if (element) { | ||
// Check if element is a cell | ||
if (element._column) { | ||
return element; | ||
} | ||
// Check if element is the cell of a focus button mode column | ||
const { parentElement } = element; | ||
if (parentElement && parentElement._focusButton === element) { | ||
return parentElement; | ||
} | ||
} | ||
return null; | ||
} | ||
@@ -249,0 +262,0 @@ |
@@ -33,11 +33,5 @@ /** | ||
static get observers() { | ||
return ['_onHeaderRendererOrBindingChanged(_headerRenderer, _headerCell, path, header, _filterValue)']; | ||
return ['_onHeaderRendererOrBindingChanged(_headerRenderer, _headerCell, path, header)']; | ||
} | ||
constructor() { | ||
super(); | ||
this.__boundOnFilterValueChanged = this.__onFilterValueChanged.bind(this); | ||
} | ||
/** | ||
@@ -58,3 +52,2 @@ * Renders the grid filter with the custom text field to the header cell. | ||
textField.setAttribute('focus-target', ''); | ||
textField.addEventListener('value-changed', this.__boundOnFilterValueChanged); | ||
filter.appendChild(textField); | ||
@@ -65,6 +58,3 @@ root.appendChild(filter); | ||
filter.path = this.path; | ||
filter.value = this._filterValue; | ||
textField.__rendererValue = this._filterValue; | ||
textField.value = this._filterValue; | ||
textField.label = this.__getHeader(this.header, this.path); | ||
@@ -84,17 +74,2 @@ } | ||
/** | ||
* Updates the internal filter value once the filter text field is changed. | ||
* The listener handles only user-fired events. | ||
* | ||
* @private | ||
*/ | ||
__onFilterValueChanged(e) { | ||
// Skip if the value is changed by the renderer. | ||
if (e.detail.value === e.target.__rendererValue) { | ||
return; | ||
} | ||
this._filterValue = e.detail.value; | ||
} | ||
/** @private */ | ||
@@ -101,0 +76,0 @@ __getHeader(header, path) { |
@@ -72,8 +72,4 @@ /** | ||
initializer: (field) => { | ||
field.addEventListener('value-changed', (e) => { | ||
if (field.__previousValue === undefined && e.detail.value === '') { | ||
field.__previousValue = e.detail.value; | ||
return; | ||
} | ||
this.value = e.detail.value; | ||
field.addEventListener('input', (e) => { | ||
this.value = e.target.value; | ||
}); | ||
@@ -92,8 +88,4 @@ | ||
} | ||
if (this._previousValue === undefined && value === '') { | ||
return; | ||
} | ||
textField.value = value; | ||
this._previousValue = value; | ||
@@ -100,0 +92,0 @@ this._debouncerFilterChanged = Debouncer.debounce(this._debouncerFilterChanged, timeOut.after(200), () => { |
@@ -592,6 +592,2 @@ /** | ||
if (column && column._onCellKeyDown) { | ||
cell.addEventListener('keydown', column._onCellKeyDown.bind(column)); | ||
} | ||
const slot = document.createElement('slot'); | ||
@@ -685,2 +681,5 @@ slot.setAttribute('name', slotName); | ||
cell = this._createCell('td', column); | ||
if (column._onCellKeyDown) { | ||
cell.addEventListener('keydown', column._onCellKeyDown.bind(column)); | ||
} | ||
column._cells.push(cell); | ||
@@ -729,3 +728,9 @@ } | ||
if (isColumnRow || column.localName === 'vaadin-grid-column-group') { | ||
cell = column[`_${section}Cell`] || this._createCell(tagName, column); | ||
cell = column[`_${section}Cell`]; | ||
if (!cell) { | ||
cell = this._createCell(tagName); | ||
if (column._onCellKeyDown) { | ||
cell.addEventListener('keydown', column._onCellKeyDown.bind(column)); | ||
} | ||
} | ||
cell._column = column; | ||
@@ -732,0 +737,0 @@ row.appendChild(cell); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
663878
187
15966
+ Added@vaadin/a11y-base@24.4.0-alpha19(transitive)
+ Added@vaadin/checkbox@24.4.0-alpha19(transitive)
+ Added@vaadin/component-base@24.4.0-alpha19(transitive)
+ Added@vaadin/field-base@24.4.0-alpha19(transitive)
+ Added@vaadin/icon@24.4.0-alpha19(transitive)
+ Added@vaadin/input-container@24.4.0-alpha19(transitive)
+ Added@vaadin/lit-renderer@24.4.0-alpha19(transitive)
+ Added@vaadin/text-field@24.4.0-alpha19(transitive)
+ Added@vaadin/vaadin-lumo-styles@24.4.0-alpha19(transitive)
+ Added@vaadin/vaadin-material-styles@24.4.0-alpha19(transitive)
+ Added@vaadin/vaadin-themable-mixin@24.4.0-alpha19(transitive)
- Removed@vaadin/a11y-base@24.4.0-alpha18(transitive)
- Removed@vaadin/checkbox@24.4.0-alpha18(transitive)
- Removed@vaadin/component-base@24.4.0-alpha18(transitive)
- Removed@vaadin/field-base@24.4.0-alpha18(transitive)
- Removed@vaadin/icon@24.4.0-alpha18(transitive)
- Removed@vaadin/input-container@24.4.0-alpha18(transitive)
- Removed@vaadin/lit-renderer@24.4.0-alpha18(transitive)
- Removed@vaadin/text-field@24.4.0-alpha18(transitive)
- Removed@vaadin/vaadin-lumo-styles@24.4.0-alpha18(transitive)
- Removed@vaadin/vaadin-material-styles@24.4.0-alpha18(transitive)
- Removed@vaadin/vaadin-themable-mixin@24.4.0-alpha18(transitive)