awing-library 2.1.201-dev → 2.1.202-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -161,7 +161,7 @@ var BasicDataForm = function (props) {
|
|
|
161
161
|
width: '100%',
|
|
162
162
|
}, children: actions }))] })), (0, jsx_runtime_1.jsx)(material_1.Grid, { container: true, spacing: 2, children: fields.map(function (fieldDef, index) {
|
|
163
163
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
164
|
-
var fieldName = fieldDef.fieldName, _t = fieldDef.type, type = _t === void 0 ? 'text' : _t, checkValid = fieldDef.checkValid, options = fieldDef.options, loading = fieldDef.loading, customeFieldChange = fieldDef.customeFieldChange, AsynchronousAutocompleteProps = fieldDef.AsynchronousAutocompleteProps, SearchProps = fieldDef.SearchProps, defaultValue = fieldDef.defaultValue, value = fieldDef.value, other = __rest(fieldDef, ["fieldName", "type", "checkValid", "options", "loading", "customeFieldChange", "AsynchronousAutocompleteProps", "SearchProps", "defaultValue", "value"]);
|
|
164
|
+
var fieldName = fieldDef.fieldName, _t = fieldDef.type, type = _t === void 0 ? 'text' : _t, checkValid = fieldDef.checkValid, options = fieldDef.options, loading = fieldDef.loading, customeFieldChange = fieldDef.customeFieldChange, AsynchronousAutocompleteProps = fieldDef.AsynchronousAutocompleteProps, AutocompleteBasicProps = fieldDef.AutocompleteBasicProps, SearchProps = fieldDef.SearchProps, defaultValue = fieldDef.defaultValue, value = fieldDef.value, other = __rest(fieldDef, ["fieldName", "type", "checkValid", "options", "loading", "customeFieldChange", "AsynchronousAutocompleteProps", "AutocompleteBasicProps", "SearchProps", "defaultValue", "value"]);
|
|
165
165
|
var fieldValue = value !== null && value !== void 0 ? value : currentObj[fieldName];
|
|
166
166
|
var showError = currentValid[fieldName] !== undefined &&
|
|
167
167
|
!currentValid[fieldName];
|
|
@@ -191,7 +191,7 @@ var BasicDataForm = function (props) {
|
|
|
191
191
|
.endAdornment] })) }), error: showError, helperText: showError
|
|
192
192
|
? (_a = fieldDef.helperText) !== null && _a !== void 0 ? _a : t('Common.InvalidData')
|
|
193
193
|
: '' })));
|
|
194
|
-
} }, index));
|
|
194
|
+
}, disableClearable: AutocompleteBasicProps === null || AutocompleteBasicProps === void 0 ? void 0 : AutocompleteBasicProps.disableClearable }, index));
|
|
195
195
|
break;
|
|
196
196
|
case 'checkbox':
|
|
197
197
|
currentField = ((0, jsx_runtime_1.jsx)(material_1.FormControl, { fullWidth: true, required: fieldDef.required, children: (0, jsx_runtime_1.jsx)(material_1.FormControlLabel, { control: (0, jsx_runtime_1.jsx)(material_1.Checkbox, { id: fieldName, name: fieldName, checked: fieldValue, onChange: function (event) {
|
|
@@ -37,6 +37,9 @@ export interface BasicFieldDefinition extends BaseTextFieldProps {
|
|
|
37
37
|
*/
|
|
38
38
|
customeFieldChange?(fieldValue: any): DataObject;
|
|
39
39
|
AsynchronousAutocompleteProps?: AsynchronousAutocompleteProps;
|
|
40
|
+
AutocompleteBasicProps?: {
|
|
41
|
+
disableClearable?: boolean;
|
|
42
|
+
};
|
|
40
43
|
SearchProps?: {
|
|
41
44
|
searchResult?: any;
|
|
42
45
|
error: boolean;
|
|
@@ -330,6 +330,7 @@ var DateRangePickerWrapper = function (props) {
|
|
|
330
330
|
'isDayBlocked',
|
|
331
331
|
'handleValid',
|
|
332
332
|
'handleDateRangePopover',
|
|
333
|
+
'required',
|
|
333
334
|
]);
|
|
334
335
|
var _u = react_1.default.useState(null), anchorElPopover = _u[0], setAnchorElPopover = _u[1];
|
|
335
336
|
var openPopper = Boolean(anchorElPopover);
|