@scheels-softdev/kendoreact-generics 2.1.11 → 2.1.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.
- package/FilterCellDropdown.js +2 -1
- package/GenericDropdown.js +1 -3
- package/package.json +1 -1
package/FilterCellDropdown.js
CHANGED
@@ -7,8 +7,9 @@ export function FilterCellDropdown(props) {
|
|
7
7
|
let hasValue = (value) => Boolean(value);
|
8
8
|
// Define an onChange function that will be called when the ComboBox value changes
|
9
9
|
const onChange = (event) => {
|
10
|
+
var _a, _b;
|
10
11
|
// Update the hasValue variable based on the new value of the ComboBox
|
11
|
-
hasValue = hasValue(event.target.value.id);
|
12
|
+
hasValue = hasValue((_b = (_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.id);
|
12
13
|
// Call the onChange function passed down as a prop, passing a filter object with the new value and operator
|
13
14
|
props.onChange({
|
14
15
|
value: hasValue ? event.target.value.id : "",
|
package/GenericDropdown.js
CHANGED
@@ -63,8 +63,6 @@ idField, title, showClearButton, }) {
|
|
63
63
|
}, suggest: true, onPageChange: pageChange, filterable: true, onFilterChange: onFilterChange, popupSettings: {
|
64
64
|
height: "210px",
|
65
65
|
}, onChange: (e) => changeEvent(e), onBlur: (e) => e.nativeEvent.preventDefault(), clearButton: showClearButton, value: selectedId !== undefined
|
66
|
-
? selectedId !== 0
|
67
|
-
? dataList.find((item) => selectedId === item[idField || "id"])
|
68
|
-
: undefined
|
66
|
+
? selectedId !== 0 && dataList.find((item) => selectedId === item[idField || "id"])
|
69
67
|
: dataList.find((x) => JSON.stringify(Object.assign(Object.assign({}, x), selectedData)) === JSON.stringify(Object.assign({}, x))) }) })));
|
70
68
|
}
|