@scheels-softdev/kendoreact-generics 2.4.4 → 2.4.6
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/GenericDropdown.js
CHANGED
@@ -46,7 +46,7 @@ export function GenericDropdown({ data, selectedId, selectedData, onChange, text
|
|
46
46
|
setDataList(data.map((x) => {
|
47
47
|
return Object.assign(Object.assign({}, x), { textValue: getTextValue(x, textFields.map((x) => x.toString()), separator) });
|
48
48
|
}));
|
49
|
-
setState(Object.assign(Object.assign({}, state), { subsetData: data.map((x) => {
|
49
|
+
setState(Object.assign(Object.assign({}, state), { total: data.length, subsetData: data.map((x) => {
|
50
50
|
return Object.assign(Object.assign({}, x), { textValue: getTextValue(x, textFields.map((x) => x.toString()), separator) });
|
51
51
|
}) }));
|
52
52
|
}
|
@@ -3,7 +3,7 @@ import { GenericDropdown } from "../GenericDropdown";
|
|
3
3
|
// This exports a function component called "CommandCellDropdown"
|
4
4
|
// It takes in various props that are used to render a dropdown in a table cell
|
5
5
|
export function CommandCellDropdown(props) {
|
6
|
-
return (_jsx("td", { children: props.checkEditField && !props.isEditing ? (props.textFields
|
6
|
+
return (_jsx("td", { children: props.checkEditField && !props.isEditing && props.data.length ? (props.textFields
|
7
7
|
.map((x) => props.data.find((y) => y[props.idField ? props.idField : "id"] === props.selectedId)[x])
|
8
8
|
.join(props.separator || " ")) : (
|
9
9
|
// If "props.checkEditField" is false or "props.isEditing" is true, render the GenericDropdownWithSearch component with the "props" passed to it
|