@agentlab/rjsf-antd
Version:
Ant Design theme, fields and widgets for react-jsonschema-form
16 lines • 773 B
JavaScript
import React from 'react';
import { Input } from 'antd';
const EmailWidget = ({ id, required, readonly, disabled, value, onChange, onBlur, onFocus, autofocus, options, schema, }) => {
const _onChange = ({ target: { value } }) => {
onChange(value === '' ? options.emptyValue : value);
};
const _onBlur = ({ target: { value } }) => {
onBlur(id, value);
};
const _onFocus = ({ target: { value } }) => {
onFocus(id, value);
};
return (React.createElement(Input, Object.assign({}, options, { type: 'text', autoFocus: autofocus, required: required, disabled: disabled || readonly, value: value, onChange: _onChange, onBlur: _onBlur, onFocus: _onFocus })));
};
export default EmailWidget;
//# sourceMappingURL=EmailWidget.js.map