drf-react-by-schema 0.21.1 → 0.21.2
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditableAutocompleteFieldBySchema.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/inputs/EditableAutocompleteFieldBySchema.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAQnD,OAAO,EAAQ,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAO3D,QAAA,MAAM,iCAAiC,
|
|
1
|
+
{"version":3,"file":"EditableAutocompleteFieldBySchema.d.ts","sourceRoot":"","sources":["../../../../src/components/forms/inputs/EditableAutocompleteFieldBySchema.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAQnD,OAAO,EAAQ,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAO3D,QAAA,MAAM,iCAAiC,gFAoWtC,CAAC;AAGF,eAAe,iCAAiC,CAAC"}
|
|
@@ -113,7 +113,7 @@ const EditableAutocompleteFieldBySchema = react_1.default.forwardRef((_a, _) =>
|
|
|
113
113
|
error: errors && Boolean(errors[name]),
|
|
114
114
|
helperText: errors && errors[name] ? errors[name].message : fieldSchema.help_text || '',
|
|
115
115
|
};
|
|
116
|
-
if (options
|
|
116
|
+
if (!options) {
|
|
117
117
|
return react_1.default.createElement(react_1.default.Fragment, null);
|
|
118
118
|
}
|
|
119
119
|
if (!disabled && !fieldSchema.disabled && onEditModel && optionsModel) {
|
|
@@ -221,7 +221,7 @@ const EditableAutocompleteFieldBySchema = react_1.default.forwardRef((_a, _) =>
|
|
|
221
221
|
];
|
|
222
222
|
}
|
|
223
223
|
return filtered;
|
|
224
|
-
}, handleHomeEndKeys: true, getOptionLabel: getOptionLabel
|
|
224
|
+
}, handleHomeEndKeys: true, getOptionKey: ({ id }) => id, getOptionLabel: getOptionLabel
|
|
225
225
|
? getOptionLabel
|
|
226
226
|
: (option) => {
|
|
227
227
|
// Value selected with enter, right from the input
|
|
@@ -261,7 +261,7 @@ const EditableAutocompleteFieldBySchema = react_1.default.forwardRef((_a, _) =>
|
|
|
261
261
|
if (onValueChange) {
|
|
262
262
|
onValueChange(e);
|
|
263
263
|
}
|
|
264
|
-
}, renderInput: (params) => (react_1.default.createElement(TextField_1.default, Object.assign({}, params, { label: label, required: (0, utils_1.isFieldRequired)(fieldSchema), margin: "normal", error: error, autoFocus: autoFocus, helperText: helperText }, other))), getOptionLabel: getOptionLabel, renderOption: renderOption }))) }));
|
|
264
|
+
}, renderInput: (params) => (react_1.default.createElement(TextField_1.default, Object.assign({}, params, { label: label, required: (0, utils_1.isFieldRequired)(fieldSchema), margin: "normal", error: error, autoFocus: autoFocus, helperText: helperText }, other))), getOptionKey: ({ id }) => id, getOptionLabel: getOptionLabel, renderOption: renderOption }))) }));
|
|
265
265
|
});
|
|
266
266
|
EditableAutocompleteFieldBySchema.displayName = 'EditableAutocompleteFieldBySchema';
|
|
267
267
|
exports.default = EditableAutocompleteFieldBySchema;
|
package/package.json
CHANGED