drf-react-by-schema 0.17.12 → 0.17.13

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.
@@ -121,6 +121,19 @@ const EditableAutocompleteFieldBySchema = react_1.default.forwardRef((_a, ref) =
121
121
  };
122
122
  }
123
123
  if (newValue && newValue.inputValue) {
124
+ if (onEditModel) {
125
+ onEditModel({
126
+ fieldKey,
127
+ index,
128
+ model: optionsModel,
129
+ id: (0, utils_1.getTmpId)(),
130
+ labelKey,
131
+ setValue,
132
+ getValues,
133
+ fieldsLayout,
134
+ });
135
+ return;
136
+ }
124
137
  const tmpId = (0, utils_1.getTmpId)();
125
138
  newValue = {
126
139
  id: tmpId,
@@ -210,7 +223,7 @@ const EditableAutocompleteFieldBySchema = react_1.default.forwardRef((_a, ref) =
210
223
  return option.label;
211
224
  }, renderOption: renderOption
212
225
  ? renderOption
213
- : (props, option) => (react_1.default.createElement("li", Object.assign({ key: option.id }, props), option.label)), renderTags: multiple
226
+ : (props, option) => react_1.default.createElement("li", Object.assign({}, props), option.label), renderTags: multiple
214
227
  ? (tagValue, getTagProps) => {
215
228
  return tagValue.map((option, index) => (react_1.default.createElement(Chip_1.default, Object.assign({}, getTagProps({ index }), { label: option.label, icon: (0, utils_1.isTmpId)(option.id) ? (react_1.default.createElement(react_1.default.Fragment, null)) : (react_1.default.createElement(IconButton_1.default, { size: "small", onClick: () => {
216
229
  if (optionsModel) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drf-react-by-schema",
3
- "version": "0.17.12",
3
+ "version": "0.17.13",
4
4
  "description": "Components and Tools for building a React App having Django Rest Framework (DRF) as server",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -59,7 +59,7 @@
59
59
  "semver": "^7.5.1",
60
60
  "ts-loader": "^9.4.2",
61
61
  "typedoc": "^0.23.23",
62
- "typescript": "^4.9.4",
62
+ "typescript": "^5.7.3",
63
63
  "webpack": "^5.75.0"
64
64
  },
65
65
  "peerDependencies": {