@grafana/ui
Version:
Grafana Components Library
1 lines • 871 B
Source Map (JSON)
{"version":3,"file":"CustomInput.mjs","sources":["../../../../src/components/Select/CustomInput.tsx"],"sourcesContent":["import { components, InputProps } from 'react-select';\n\n/**\n * Custom input component for react-select to add data-testid attribute\n */\nexport const CustomInput = (props: InputProps) => {\n let testId;\n\n if ('data-testid' in props.selectProps && props.selectProps['data-testid']) {\n testId = props.selectProps['data-testid'] + '-input';\n }\n\n return <components.Input {...props} data-testid={testId} />;\n};\n"],"names":[],"mappings":";;;;AAKO,MAAM,WAAA,GAAc,CAAC,KAAA,KAAsB;AAChD,EAAA,IAAI,MAAA;AAEJ,EAAA,IAAI,iBAAiB,KAAA,CAAM,WAAA,IAAe,KAAA,CAAM,WAAA,CAAY,aAAa,CAAA,EAAG;AAC1E,IAAA,MAAA,GAAS,KAAA,CAAM,WAAA,CAAY,aAAa,CAAA,GAAI,QAAA;AAAA,EAC9C;AAEA,EAAA,2BAAQ,UAAA,CAAW,KAAA,EAAX,EAAkB,GAAG,KAAA,EAAO,eAAa,MAAA,EAAQ,CAAA;AAC3D;;;;"}