@scheels-softdev/kendoreact-generics 2.4.3 → 2.4.4
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.d.ts +2 -1
- package/GenericDropdown.js +2 -2
- package/package.json +1 -1
package/GenericDropdown.d.ts
CHANGED
@@ -27,6 +27,7 @@ type GenericDDProps<T> = {
|
|
27
27
|
hideClearButton?: boolean;
|
28
28
|
/** Custom CSS properties for the component. (optional)*/
|
29
29
|
style?: CSSProperties;
|
30
|
+
isLoading?: boolean;
|
30
31
|
};
|
31
|
-
export declare function GenericDropdown<T>({ data, selectedId, selectedData, onChange, textFields, separator, disabled, idField, title, hideClearButton, style, }: GenericDDProps<T>): import("react/jsx-runtime").JSX.Element;
|
32
|
+
export declare function GenericDropdown<T>({ data, selectedId, selectedData, onChange, textFields, separator, disabled, idField, title, hideClearButton, style, isLoading, }: GenericDDProps<T>): import("react/jsx-runtime").JSX.Element;
|
32
33
|
export {};
|
package/GenericDropdown.js
CHANGED
@@ -4,7 +4,7 @@ import { filterBy } from "@progress/kendo-data-query";
|
|
4
4
|
import { useEffect, useRef, useState } from "react";
|
5
5
|
import { getTextValue } from "./Utility";
|
6
6
|
import { Skeleton } from "@progress/kendo-react-indicators";
|
7
|
-
export function GenericDropdown({ data, selectedId, selectedData, onChange, textFields, separator, disabled, idField, title, hideClearButton, style, }) {
|
7
|
+
export function GenericDropdown({ data, selectedId, selectedData, onChange, textFields, separator, disabled, idField, title, hideClearButton, style, isLoading, }) {
|
8
8
|
if (selectedId !== undefined && selectedData !== undefined) {
|
9
9
|
throw new Error("You cannot provide both selectedData and selectedId to GenericDropdown.");
|
10
10
|
}
|
@@ -63,7 +63,7 @@ export function GenericDropdown({ data, selectedId, selectedData, onChange, text
|
|
63
63
|
console.log(returnVal);
|
64
64
|
return returnVal;
|
65
65
|
};
|
66
|
-
return (_jsx("div", Object.assign({ "data-testid": "dropdown" }, { children: dataList.length ? (_jsx(ComboBox, { style: style, label: title, disabled: disabled, data: state.subsetData, textField: "textValue", virtual: {
|
66
|
+
return (_jsx("div", Object.assign({ "data-testid": "dropdown" }, { children: dataList.length && !isLoading ? (_jsx(ComboBox, { style: style, label: title, disabled: disabled, data: state.subsetData, textField: "textValue", virtual: {
|
67
67
|
// enable virtualization for large datasets
|
68
68
|
total: state.total,
|
69
69
|
pageSize: pageSize,
|