@aquera/nile-elements 1.2.6-beta-1.1 → 1.2.6-beta-1.4

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.
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Webcomponent nile-elements following open-wc recommendations",
4
4
  "license": "MIT",
5
5
  "author": "nile-elements",
6
- "version": "1.2.6-beta-1.1",
6
+ "version": "1.2.6-beta-1.4",
7
7
  "main": "dist/src/index.js",
8
8
  "type": "module",
9
9
  "module": "dist/src/index.js",
@@ -69,7 +69,8 @@ export class VirtualScrollHelper {
69
69
  listbox,
70
70
  search,
71
71
  loader,
72
- footer
72
+ footer,
73
+ tag__content
73
74
  "
74
75
  >
75
76
  <slot name="prefix" slot="prefix"></slot>
@@ -1112,6 +1112,7 @@ export class NileVirtualSelect extends NileElement implements NileFormControl {
1112
1112
  sync=${ifDefined(!this.noWidthSync ? 'width' : undefined)}
1113
1113
  auto-size="vertical"
1114
1114
  auto-size-padding="10"
1115
+ exportparts="tag__content"
1115
1116
  >
1116
1117
  ${this.renderCustomSelect(hasCustomSelect)}
1117
1118
  ${this.renderCombobox(hasCustomSelect, hasClearIcon)}
@@ -1510,7 +1511,7 @@ export class NileVirtualSelect extends NileElement implements NileFormControl {
1510
1511
  requestAnimationFrame(() => {
1511
1512
  let listbox: HTMLElement | null = null;
1512
1513
 
1513
- // Select listbox (portal vs non-portal)
1514
+
1514
1515
  if (this.portal && this.portalManager.portalContainerElement) {
1515
1516
  listbox = this.portalManager.portalContainerElement.querySelector('#listbox') as HTMLElement;
1516
1517
  } else {
@@ -1519,22 +1520,17 @@ export class NileVirtualSelect extends NileElement implements NileFormControl {
1519
1520
 
1520
1521
  if (!listbox || !listbox.isConnected) return;
1521
1522
 
1522
- // Always reset scroll position
1523
1523
  listbox.scrollTop = 0;
1524
-
1525
- // When very few items, collapse overflow completely
1526
1524
  const virtualized = listbox.querySelector('.virtualized') as HTMLElement;
1527
1525
  if (virtualized && virtualized.isConnected) {
1528
1526
  const fewItems = this.data.length <= 5;
1529
1527
 
1530
1528
  if (fewItems) {
1531
- // 👇 Prevent *any* scrolling and let height shrink
1532
1529
  virtualized.style.overflowY = 'hidden';
1533
1530
  virtualized.style.maxHeight = 'none';
1534
1531
  listbox.style.overflowY = 'hidden';
1535
1532
  listbox.style.maxHeight = 'fit-content';
1536
1533
  } else {
1537
- // 👇 Re-enable scrolling when many items
1538
1534
  virtualized.style.overflowY = 'auto';
1539
1535
  virtualized.style.maxHeight = '';
1540
1536
  listbox.style.overflowY = 'auto';
@@ -1543,8 +1539,6 @@ export class NileVirtualSelect extends NileElement implements NileFormControl {
1543
1539
 
1544
1540
  virtualized.scrollTop = 0;
1545
1541
  }
1546
-
1547
- // lit-virtualizer (if used)
1548
1542
  const virtualizer = listbox.querySelector('lit-virtualizer') as HTMLElement;
1549
1543
  if (virtualizer && virtualizer.isConnected) {
1550
1544
  virtualizer.scrollTop = 0;