@strapi/ui-primitives 2.0.0-beta.6 → 2.0.0-rc.8
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.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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);
|