@neovici/cosmoz-omnitable 13.1.0 → 13.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -127,7 +127,6 @@ class OmnitableColumnListData extends translatable(mixin(Template, PolymerElemen
127
127
  this._expanded = !this._expanded;
128
128
  event.stopPropagation();
129
129
  event.preventDefault();
130
- this.dispatchEvent(new CustomEvent('expand', { bubbles: true }));
131
130
  }
132
131
  }
133
132
 
@@ -14,7 +14,6 @@ import {
14
14
  onText,
15
15
  } from './cosmoz-omnitable-column-list-mixin';
16
16
  import '@neovici/cosmoz-autocomplete';
17
- import { notifyResize } from './lib/utils';
18
17
  import { columnSymbol } from './lib/use-dom-columns';
19
18
 
20
19
  /**
@@ -41,10 +40,9 @@ class OmnitableColumnList extends listColumnMixin(columnMixin(PolymerElement)) {
41
40
  };
42
41
  }
43
42
 
44
- renderCell({ valuePath, textProperty }, { item, index }) {
43
+ renderCell({ valuePath, textProperty }, { item }) {
45
44
  return html`<cosmoz-omnitable-column-list-data
46
45
  .items=${getTexts(item, valuePath, textProperty)}
47
- @expand=${(event) => notifyResize(event.target, index)}
48
46
  ></cosmoz-omnitable-column-list-data>`;
49
47
  }
50
48
 
@@ -2,7 +2,6 @@
2
2
  import { component, useEffect } from '@pionjs/pion';
3
3
  import { html, nothing } from 'lit-html';
4
4
  import './cosmoz-omnitable-item-expand-line';
5
- import { notifyResize } from './lib/utils';
6
5
 
7
6
  const renderExpandList = ({
8
7
  columns,
@@ -24,7 +23,7 @@ const renderExpandList = ({
24
23
  >`
25
24
  ),
26
25
  ExpandList = (host) => {
27
- const { expanded, index, columns } = host;
26
+ const { columns } = host;
28
27
 
29
28
  useEffect(() => {
30
29
  if (columns?.length > 0) {
@@ -35,11 +34,6 @@ const renderExpandList = ({
35
34
  return () => host.removeAttribute('hidden');
36
35
  }, [columns?.length]);
37
36
 
38
- useEffect(
39
- () => expanded && requestAnimationFrame(() => notifyResize(host, index)),
40
- [expanded]
41
- );
42
-
43
37
  return Array.isArray(columns) && columns.length > 0 && host.expanded
44
38
  ? renderExpandList(host)
45
39
  : nothing;
package/lib/use-list.js CHANGED
@@ -165,11 +165,6 @@ export const useList = ({
165
165
  );
166
166
  }, []);
167
167
 
168
- useEffect(() => {
169
- host.shadowRoot.querySelector('#groupedList').scrollTarget =
170
- host.shadowRoot.querySelector('#scroller');
171
- }, []);
172
-
173
168
  const { groupOnColumn } = sortAndGroupOptions,
174
169
  onItemChange = useCallback(
175
170
  (column, item) => (value) => _onItemChange(host, column, item, value),
package/lib/utils.js CHANGED
@@ -1,10 +1,3 @@
1
- const notifyResize = (target, index) =>
2
- target.dispatchEvent(
3
- new CustomEvent('update-item-size', {
4
- bubbles: true,
5
- detail: { index },
6
- })
7
- ),
8
- indexSymbol = Symbol('index');
1
+ const indexSymbol = Symbol('index');
9
2
 
10
- export { notifyResize, indexSymbol };
3
+ export { indexSymbol };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neovici/cosmoz-omnitable",
3
- "version": "13.1.0",
3
+ "version": "13.2.0",
4
4
  "description": "[![Build Status](https://travis-ci.org/Neovici/cosmoz-omnitable.svg?branch=master)](https://travis-ci.org/Neovici/cosmoz-omnitable)",
5
5
  "keywords": [
6
6
  "web-components"
@@ -64,7 +64,7 @@
64
64
  "@neovici/cosmoz-collapse": "^1.1.0",
65
65
  "@neovici/cosmoz-datetime-input": "^4.0.0",
66
66
  "@neovici/cosmoz-dropdown": "^4.0.0",
67
- "@neovici/cosmoz-grouped-list": "^7.0.0",
67
+ "@neovici/cosmoz-grouped-list": "^8.0.0",
68
68
  "@neovici/cosmoz-i18next": "^3.1.1",
69
69
  "@neovici/cosmoz-input": "^4.0.0",
70
70
  "@neovici/cosmoz-router": "^11.0.0",