UNPKG

@intility/bifrost-react-select

Version:

React select component for Intility's design system, Bifrost.

33 lines (32 loc) 1.08 kB
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime"; import { components } from "react-select"; const CustomInput = (props)=>{ const { required, value } = props.selectProps; const updatedProps = { ...props, autoComplete: "off" }; return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsx(components.Input, { ...updatedProps }), /*#__PURE__*/ _jsx("input", { style: { opacity: 0, height: 0, position: "absolute", pointerEvents: "none" }, onChange: (e)=>e.preventDefault(), // eslint-disable-next-line @typescript-eslint/no-explicit-any value: value?.label ?? "", tabIndex: -1, autoComplete: "off", required: required, "data-testid": "bf-select-input" }) ] }); }; export default CustomInput;