@gentleduck/registry-ui 0.2.4 → 0.2.5
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/CHANGELOG.md +14 -0
- package/package.json +1 -1
- package/src/command/command.tsx +8 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @gentleduck/registry-ui
|
|
2
2
|
|
|
3
|
+
## 0.2.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fix(search): disable primitive's built-in filter when using custom lunr search
|
|
8
|
+
|
|
9
|
+
The command menu had two competing filtering systems: lunr-based search and the primitive's
|
|
10
|
+
substring filter. The primitive's filter was hiding items via `el.hidden = true` even when
|
|
11
|
+
lunr correctly found them, causing search results to not appear. Added `shouldFilter` prop
|
|
12
|
+
to the Command primitive to allow disabling the built-in filter.
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
- @gentleduck/primitives@0.2.4
|
|
16
|
+
|
|
3
17
|
## 0.2.4
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/package.json
CHANGED
package/src/command/command.tsx
CHANGED
|
@@ -162,13 +162,19 @@ function CommandShortcut({
|
|
|
162
162
|
)
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
-
function CommandDialog({
|
|
165
|
+
function CommandDialog({
|
|
166
|
+
children,
|
|
167
|
+
shouldFilter,
|
|
168
|
+
...props
|
|
169
|
+
}: React.ComponentPropsWithRef<typeof Dialog> & { shouldFilter?: boolean }): React.JSX.Element {
|
|
166
170
|
return (
|
|
167
171
|
<Dialog {...props}>
|
|
168
172
|
<DialogContent className="h-125 max-w-full p-0 lg:w-[700px]">
|
|
169
173
|
<DialogTitle className="sr-only">Command palette</DialogTitle>
|
|
170
174
|
<DialogDescription className="sr-only">Search for commands and navigation items</DialogDescription>
|
|
171
|
-
<Command className="max-w-full"
|
|
175
|
+
<Command className="max-w-full" shouldFilter={shouldFilter}>
|
|
176
|
+
{children}
|
|
177
|
+
</Command>
|
|
172
178
|
</DialogContent>
|
|
173
179
|
</Dialog>
|
|
174
180
|
)
|