@ark-ui/solid 3.0.0-3 → 3.0.0-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.
@@ -10,7 +10,7 @@ export const useCombobox = (props) => {
10
10
  'itemToString',
11
11
  'items',
12
12
  ]);
13
- const collection = () => combobox.collection(collectionOptions);
13
+ const collection = createMemo(() => combobox.collection(collectionOptions));
14
14
  const locale = useLocaleContext();
15
15
  const environment = useEnvironmentContext();
16
16
  const context = mergeProps({
@@ -18,7 +18,9 @@ export const useCombobox = (props) => {
18
18
  dir: locale().dir,
19
19
  getRootNode: environment().getRootNode,
20
20
  'open.controlled': props.open !== undefined,
21
- collection: collection(),
21
+ get collection() {
22
+ return collection();
23
+ },
22
24
  }, rest);
23
25
  const [state, send] = useMachine(combobox.machine(context), {
24
26
  context,
@@ -4,22 +4,24 @@ import { createMemo, createUniqueId } from 'solid-js';
4
4
  import { useEnvironmentContext, useLocaleContext } from '../../providers';
5
5
  import { createSplitProps } from '../../utils/create-split-props';
6
6
  export const useSelect = (props) => {
7
- const [collectionOptions, rest] = createSplitProps()(props, [
7
+ const [collectionOptions, localProps] = createSplitProps()(props, [
8
8
  'isItemDisabled',
9
9
  'itemToValue',
10
10
  'itemToString',
11
11
  'items',
12
12
  ]);
13
- const collection = () => select.collection(collectionOptions);
13
+ const collection = createMemo(() => select.collection(collectionOptions));
14
14
  const locale = useLocaleContext();
15
15
  const environment = useEnvironmentContext();
16
16
  const context = mergeProps({
17
17
  id: createUniqueId(),
18
18
  dir: locale().dir,
19
19
  getRootNode: environment().getRootNode,
20
- collection: collection(),
21
20
  'open.controlled': props.open !== undefined,
22
- }, rest);
21
+ get collection() {
22
+ return collection();
23
+ },
24
+ }, localProps);
23
25
  const [state, send] = useMachine(select.machine(context), {
24
26
  context,
25
27
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ark-ui/solid",
3
- "version": "3.0.0-3",
3
+ "version": "3.0.0-4",
4
4
  "description": "A collection of unstyled, accessible UI components for Solid, utilizing state machines for seamless interaction.",
5
5
  "keywords": [
6
6
  "accordion",