Files
klz-cables.com/.pnpm-store/v10/files/a0/fd37072b157af8004543682f6574301cc0586ebce8e2719aa92c9cd88ae66637210824f0c2e010f835cb3bbe897175891ffc335a3537c1b421e8843e00d5ce
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

46 lines
1.5 KiB
Plaintext

'use client';
import { jsx as _jsx } from "react/jsx-runtime";
import React from 'react';
import { components as SelectComponents } from 'react-select';
export const Control = props => {
const {
children,
innerProps,
// @ts-expect-error-next-line // TODO Fix this - moduleResolution 16 breaks our declare module
selectProps: {
customProps: {
disableKeyDown,
disableMouseDown
} = {}
} = {}
} = props;
return /*#__PURE__*/_jsx(React.Fragment, {
children: /*#__PURE__*/_jsx(SelectComponents.Control, {
...props,
innerProps: {
...innerProps,
onKeyDown: e => {
if (disableKeyDown) {
e.stopPropagation();
// Create event for keydown listeners which specifically want to bypass this stopPropagation
const bypassEvent = new CustomEvent('bypassKeyDown', {
detail: e
});
document.dispatchEvent(bypassEvent);
}
},
// react-select has this typed incorrectly so we disable the linting rule
// we need to prevent react-select from hijacking the 'onKeyDown' event while modals are open (i.e. the 'Relationship' field component)
onMouseDown: e => {
// we need to prevent react-select from hijacking the 'onMouseDown' event while modals are open (i.e. the 'Relationship' field component)
if (!disableMouseDown) {
innerProps.onMouseDown(e);
}
}
},
children: children
})
});
};
//# sourceMappingURL=index.js.map