@strapi/ui-primitives 2.0.0-beta.5 → 2.0.0-rc.10

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/dist/index.mjs CHANGED
@@ -316,10 +316,18 @@ const ComboboxTrigger = React.forwardRef((props, forwardedRef) => {
316
316
  ref: forwardedRef,
317
317
  "data-disabled": context.disabled ? "" : void 0,
318
318
  ...triggerProps,
319
- onClick: composeEventHandlers$1(triggerProps.onClick, () => {
319
+ onClick: composeEventHandlers$1(triggerProps.onClick, (event) => {
320
+ if (context.disabled) {
321
+ event.preventDefault();
322
+ return;
323
+ }
320
324
  context.trigger?.focus();
321
325
  }),
322
326
  onPointerDown: composeEventHandlers$1(triggerProps.onPointerDown, (event) => {
327
+ if (context.disabled) {
328
+ event.preventDefault();
329
+ return;
330
+ }
323
331
  const target = event.target;
324
332
  if (target.hasPointerCapture(event.pointerId)) {
325
333
  target.releasePointerCapture(event.pointerId);
@@ -855,11 +863,6 @@ const ComboboxNoValueFound = React.forwardRef((props, ref) => {
855
863
  unsub();
856
864
  };
857
865
  }, [subscribe]);
858
- if (items.length === 0)
859
- return null;
860
- if (autocomplete.type === "none") {
861
- return null;
862
- }
863
866
  if (autocomplete.type === "list" && autocomplete.filter === "startsWith" && items.some((item) => startsWith(item.textValue, textValue))) {
864
867
  return null;
865
868
  }