@scheels-softdev/kendoreact-generics 2.2.8 → 2.2.10
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 +11 -11
- package/GenericDropdown.js +11 -11
- package/package.json +1 -1
package/GenericDropdown.d.ts
CHANGED
@@ -3,17 +3,17 @@ 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
|
-
* @
|
7
|
-
* @
|
8
|
-
* @
|
9
|
-
* @
|
10
|
-
* @
|
11
|
-
* @
|
12
|
-
* @
|
13
|
-
* @
|
14
|
-
* @
|
15
|
-
* @
|
16
|
-
* @
|
6
|
+
* @prop {T[]} data - Array of data objects. (Tooltip: The data to populate the dropdown options.)
|
7
|
+
* @prop {number} [selectedId] - ID of the selected data object. (Tooltip: The ID of the currently selected item.)
|
8
|
+
* @prop {T} [selectedData] - The selected data object. Use this instead of selectedId if there is no identity key in the object. (Tooltip: The currently selected data object.)
|
9
|
+
* @prop {Function} onChange - Function to call when the selected value changes. (Tooltip: Callback function triggered when the selected value changes.)
|
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
|
+
* @prop {string} [separator] - Optional separator to use for concatenating text values. (Tooltip: The separator to use when concatenating multiple text values.)
|
12
|
+
* @prop {boolean} [disabled] - Boolean to disable the dropdown. (Tooltip: Determines whether the dropdown is disabled.)
|
13
|
+
* @prop {keyof T} [idField] - The field name to use as the identity key. If the id field to look at isn't 'id', what is it? (Tooltip: The field name used as the identity key.)
|
14
|
+
* @prop {string} [title] - The label of the dropdown. (Tooltip: The label displayed for the dropdown.)
|
15
|
+
* @prop {boolean} [hideClearButton] - Set to true if you want to hide the clear button. (Tooltip: Determines whether the clear button is hidden from the dropdown.)
|
16
|
+
* @prop {CSSProperties} [style] - The CSS properties you want to use. It is generally recommended to do styling in your App.css file, but if necessary, this prop is available to you. (Tooltip: Custom CSS properties for the component.)
|
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, }: {
|
package/GenericDropdown.js
CHANGED
@@ -10,17 +10,17 @@ 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
|
-
* @
|
14
|
-
* @
|
15
|
-
* @
|
16
|
-
* @
|
17
|
-
* @
|
18
|
-
* @
|
19
|
-
* @
|
20
|
-
* @
|
21
|
-
* @
|
22
|
-
* @
|
23
|
-
* @
|
13
|
+
* @prop {T[]} data - Array of data objects. (Tooltip: The data to populate the dropdown options.)
|
14
|
+
* @prop {number} [selectedId] - ID of the selected data object. (Tooltip: The ID of the currently selected item.)
|
15
|
+
* @prop {T} [selectedData] - The selected data object. Use this instead of selectedId if there is no identity key in the object. (Tooltip: The currently selected data object.)
|
16
|
+
* @prop {Function} onChange - Function to call when the selected value changes. (Tooltip: Callback function triggered when the selected value changes.)
|
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
|
+
* @prop {string} [separator] - Optional separator to use for concatenating text values. (Tooltip: The separator to use when concatenating multiple text values.)
|
19
|
+
* @prop {boolean} [disabled] - Boolean to disable the dropdown. (Tooltip: Determines whether the dropdown is disabled.)
|
20
|
+
* @prop {keyof T} [idField] - The field name to use as the identity key. If the id field to look at isn't 'id', what is it? (Tooltip: The field name used as the identity key.)
|
21
|
+
* @prop {string} [title] - The label of the dropdown. (Tooltip: The label displayed for the dropdown.)
|
22
|
+
* @prop {boolean} [hideClearButton] - Set to true if you want to hide the clear button. (Tooltip: Determines whether the clear button is hidden from the dropdown.)
|
23
|
+
* @prop {CSSProperties} [style] - The CSS properties you want to use. It is generally recommended to do styling in your App.css file, but if necessary, this prop is available to you. (Tooltip: Custom CSS properties for the component.)
|
24
24
|
* @returns {JSX.Element}
|
25
25
|
*/
|
26
26
|
export function GenericDropdown({ data, selectedId, selectedData, onChange, textFields, separator, disabled, idField, title, hideClearButton, style, }) {
|