@adaptabletools/adaptable
Version:
Powerful AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
17 lines (16 loc) • 804 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import * as React from 'react';
import Input from '../../../components/Input';
import { useAdaptable } from '../../AdaptableContext';
import AdaptableDateInput from '../AdaptableDateInput';
const AdaptableInput = React.forwardRef((props, ref) => {
const useNativeInputDate = useAdaptable().adaptableOptions.userInterfaceOptions?.dateInputOptions?.useNativeInput;
const { showClearButton, showTriggerButton, ...inputProps } = props;
if (props.type === 'date' && !useNativeInputDate) {
return (_jsx(AdaptableDateInput, { showClearButton: showClearButton, showTriggerButton: showTriggerButton, ...inputProps, ref: ref }));
}
else {
return _jsx(Input, { ...inputProps, ref: ref });
}
});
export default AdaptableInput;