@scheels-softdev/kendoreact-generics 2.2.10 → 2.2.11
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 +15 -4
- package/GenericDropdown.js +4 -4
- package/package.json +1 -1
package/GenericDropdown.d.ts
CHANGED
@@ -3,10 +3,10 @@ import { CSSProperties } from "react";
|
|
3
3
|
* JSX Component for displaying items in a virtualized combobox
|
4
4
|
* @template T - The type of the data objects in the dropdown.
|
5
5
|
* @param {object} props - The component props.
|
6
|
-
* @prop {T[]} data - Array of data objects. (Tooltip:
|
7
|
-
* @prop {number} [selectedId] - ID of the selected data object. (Tooltip:
|
8
|
-
* @prop {T} [selectedData] - The selected data object. Use this instead of selectedId if there is no identity key in the object. (Tooltip:
|
9
|
-
* @prop {Function} onChange - Function to call when the selected value changes. (Tooltip:
|
6
|
+
* @prop {T[]} data - Array of data objects. (Tooltip: .)
|
7
|
+
* @prop {number} [selectedId] - ID of the selected data object. (Tooltip:)
|
8
|
+
* @prop {T} [selectedData] - The selected data object. Use this instead of selectedId if there is no identity key in the object. (Tooltip: )
|
9
|
+
* @prop {Function} onChange - Function to call when the selected value changes. (Tooltip: .)
|
10
10
|
* @prop {(keyof T)[]} textFields - Array of field names to use for text values. (Tooltip: The field names used to extract text values for display.)
|
11
11
|
* @prop {string} [separator] - Optional separator to use for concatenating text values. (Tooltip: The separator to use when concatenating multiple text values.)
|
12
12
|
* @prop {boolean} [disabled] - Boolean to disable the dropdown. (Tooltip: Determines whether the dropdown is disabled.)
|
@@ -17,15 +17,26 @@ import { CSSProperties } from "react";
|
|
17
17
|
* @returns {JSX.Element}
|
18
18
|
*/
|
19
19
|
export declare function GenericDropdown<T>({ data, selectedId, selectedData, onChange, textFields, separator, disabled, idField, title, hideClearButton, style, }: {
|
20
|
+
/** The data to populate the dropdown options*/
|
20
21
|
data: T[];
|
22
|
+
/** The ID of the currently selected item.*/
|
21
23
|
selectedId?: number;
|
24
|
+
/** The currently selected data object. */
|
22
25
|
selectedData?: T;
|
26
|
+
/** Callback function triggered when the selected value changes*/
|
23
27
|
onChange: Function;
|
28
|
+
/** The list of data to feed the dropdown */
|
24
29
|
textFields: (keyof T)[];
|
30
|
+
/** The list of data to feed the dropdown */
|
25
31
|
separator?: string;
|
32
|
+
/** The list of data to feed the dropdown */
|
26
33
|
idField?: keyof T;
|
34
|
+
/** The list of data to feed the dropdown */
|
27
35
|
disabled?: boolean;
|
36
|
+
/** The list of data to feed the dropdown */
|
28
37
|
title?: string;
|
38
|
+
/** The list of data to feed the dropdown */
|
29
39
|
hideClearButton?: boolean;
|
40
|
+
/** The list of data to feed the dropdown */
|
30
41
|
style?: CSSProperties;
|
31
42
|
}): import("react/jsx-runtime").JSX.Element;
|
package/GenericDropdown.js
CHANGED
@@ -10,10 +10,10 @@ import { getTextValue } from "./Utility";
|
|
10
10
|
* JSX Component for displaying items in a virtualized combobox
|
11
11
|
* @template T - The type of the data objects in the dropdown.
|
12
12
|
* @param {object} props - The component props.
|
13
|
-
* @prop {T[]} data - Array of data objects. (Tooltip:
|
14
|
-
* @prop {number} [selectedId] - ID of the selected data object. (Tooltip:
|
15
|
-
* @prop {T} [selectedData] - The selected data object. Use this instead of selectedId if there is no identity key in the object. (Tooltip:
|
16
|
-
* @prop {Function} onChange - Function to call when the selected value changes. (Tooltip:
|
13
|
+
* @prop {T[]} data - Array of data objects. (Tooltip: .)
|
14
|
+
* @prop {number} [selectedId] - ID of the selected data object. (Tooltip:)
|
15
|
+
* @prop {T} [selectedData] - The selected data object. Use this instead of selectedId if there is no identity key in the object. (Tooltip: )
|
16
|
+
* @prop {Function} onChange - Function to call when the selected value changes. (Tooltip: .)
|
17
17
|
* @prop {(keyof T)[]} textFields - Array of field names to use for text values. (Tooltip: The field names used to extract text values for display.)
|
18
18
|
* @prop {string} [separator] - Optional separator to use for concatenating text values. (Tooltip: The separator to use when concatenating multiple text values.)
|
19
19
|
* @prop {boolean} [disabled] - Boolean to disable the dropdown. (Tooltip: Determines whether the dropdown is disabled.)
|