From c2804903811a29d4acfb697c8a098c74b2a5688b Mon Sep 17 00:00:00 2001 From: Segun Adebayo Date: Fri, 15 Sep 2023 11:46:12 +0100 Subject: [PATCH] fix: add readonly to collection --- .changeset/fuzzy-moose-divide.md | 5 +++++ packages/utilities/collection/src/types.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/fuzzy-moose-divide.md diff --git a/.changeset/fuzzy-moose-divide.md b/.changeset/fuzzy-moose-divide.md new file mode 100644 index 0000000000..616805898c --- /dev/null +++ b/.changeset/fuzzy-moose-divide.md @@ -0,0 +1,5 @@ +--- +"@zag-js/collection": patch +--- + +Add support for readonly items in collection type diff --git a/packages/utilities/collection/src/types.ts b/packages/utilities/collection/src/types.ts index eac6193986..cc2fb60d54 100644 --- a/packages/utilities/collection/src/types.ts +++ b/packages/utilities/collection/src/types.ts @@ -24,7 +24,7 @@ export interface CollectionOptions { /** * The options of the select */ - items: T[] + items: T[] | readonly T[] /** * The value of the item */