@neovici/cosmoz-autocomplete 5.3.1 → 5.3.2

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/cosmoz-listbox.js CHANGED
@@ -1,4 +1,4 @@
1
- import { html, component, useEffect, useRef } from 'haunted';
1
+ import { html, component, useEffect, useRef, useMemo } from 'haunted';
2
2
  import { ref } from 'lit-html/directives/ref.js';
3
3
  import {
4
4
  virtualize,
@@ -114,6 +114,11 @@ const svg =
114
114
  vl.element(position.index)?.scrollIntoView({ block: 'nearest' });
115
115
  }, [position]);
116
116
 
117
+ const layout = useMemo(
118
+ () => ({ _itemSize: { height: itemHeight - 0.00001 } }),
119
+ [itemHeight]
120
+ );
121
+
117
122
  return html` <style>
118
123
  ${styles({ ...position, height, itemHeight })}
119
124
  </style>
@@ -123,7 +128,7 @@ const svg =
123
128
  items,
124
129
  renderItem,
125
130
  scroller: true,
126
- layout: { _itemSize: { height: itemHeight - 0.00001 } },
131
+ layout,
127
132
  })}
128
133
  </div>`;
129
134
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neovici/cosmoz-autocomplete",
3
- "version": "5.3.1",
3
+ "version": "5.3.2",
4
4
  "description": "A autocomplete input web component",
5
5
  "keywords": [
6
6
  "lit-html",