UNPKG

@react-awesome-query-builder/fluent

Version:
29 lines 888 B
import _extends from "@babel/runtime/helpers/extends"; import React from "react"; import { TextField } from "@fluentui/react"; export default (function (props) { var value = props.value, setValue = props.setValue, config = props.config, readonly = props.readonly, placeholder = props.placeholder, maxLength = props.maxLength, maxRows = props.maxRows, fullWidth = props.fullWidth, customProps = props.customProps; var onChange = function onChange(e) { var val = e.target.value; if (val === "") val = undefined; // don't allow empty value setValue(val); }; var textValue = value || ""; return /*#__PURE__*/React.createElement(TextField, _extends({ readOnly: readonly, multiline: true, rows: maxRows, maxLength: maxLength, placeholder: placeholder, value: textValue, onChange: onChange }, customProps)); });