@scheels-softdev/kendoreact-generics 2.2.5 → 2.2.7
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 +13 -12
- package/GenericDropdown.js +13 -12
- package/package.json +1 -1
package/GenericDropdown.d.ts
CHANGED
@@ -1,19 +1,20 @@
|
|
1
1
|
import { CSSProperties } from "react";
|
2
2
|
/**
|
3
3
|
* JSX Component for displaying selected images in a fullscreen Modal
|
4
|
+
* @template T - The type of the data objects in the dropdown.
|
4
5
|
* @param {object} props
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
* @returns
|
6
|
+
* @param {T[]} props.data - array of data objects
|
7
|
+
* @param {number} [props.selectedId] - id of the selected data object
|
8
|
+
* @param {T} [props.selectedData] - if there is no identity key in the object and you need to compare the entire object, use this instead of selectedId
|
9
|
+
* @param {Function} props.onChange - function to call when the selected value changes
|
10
|
+
* @param {(keyof T)[] } props.textFields - array of field names to use for text values
|
11
|
+
* @param {string} [props.separator] - optional separator to use for concatenating text values
|
12
|
+
* @param {object} [props.disabled] - boolean to disable the dropdown
|
13
|
+
* @param {keyof T} [props.idField] - if the id field to look at isn't 'id', what is it?
|
14
|
+
* @param {string} [props.title] - the label of the dropdown
|
15
|
+
* @param {boolean} [props.showClearButton] - set to false if you want to hide clear button
|
16
|
+
* @param {CSSProperties} [props.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
|
17
|
+
* @returns {JSX.Element}
|
17
18
|
*/
|
18
19
|
export declare function GenericDropdown<T>({ data, selectedId, selectedData, onChange, textFields, separator, disabled, idField, title, hideClearButton, style, }: {
|
19
20
|
data: T[];
|
package/GenericDropdown.js
CHANGED
@@ -8,19 +8,20 @@ import { getTextValue } from "./Utility";
|
|
8
8
|
// component that renders a dropdown with a search filter
|
9
9
|
/**
|
10
10
|
* JSX Component for displaying selected images in a fullscreen Modal
|
11
|
+
* @template T - The type of the data objects in the dropdown.
|
11
12
|
* @param {object} props
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
* @returns
|
13
|
+
* @param {T[]} props.data - array of data objects
|
14
|
+
* @param {number} [props.selectedId] - id of the selected data object
|
15
|
+
* @param {T} [props.selectedData] - if there is no identity key in the object and you need to compare the entire object, use this instead of selectedId
|
16
|
+
* @param {Function} props.onChange - function to call when the selected value changes
|
17
|
+
* @param {(keyof T)[] } props.textFields - array of field names to use for text values
|
18
|
+
* @param {string} [props.separator] - optional separator to use for concatenating text values
|
19
|
+
* @param {object} [props.disabled] - boolean to disable the dropdown
|
20
|
+
* @param {keyof T} [props.idField] - if the id field to look at isn't 'id', what is it?
|
21
|
+
* @param {string} [props.title] - the label of the dropdown
|
22
|
+
* @param {boolean} [props.showClearButton] - set to false if you want to hide clear button
|
23
|
+
* @param {CSSProperties} [props.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
|
24
|
+
* @returns {JSX.Element}
|
24
25
|
*/
|
25
26
|
export function GenericDropdown({ data, selectedId, selectedData, onChange, textFields, separator, disabled, idField, title, hideClearButton, style, }) {
|
26
27
|
if (selectedId !== undefined && selectedData !== undefined) {
|