@gpa-gemstone/react-forms 1.1.64 → 1.1.65
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/lib/RadioButtons.d.ts +32 -1
- package/lib/Select.d.ts +1 -1
- package/lib/Select.js +1 -1
- package/package.json +1 -1
package/lib/RadioButtons.d.ts
CHANGED
|
@@ -1,14 +1,45 @@
|
|
|
1
1
|
interface IProps<T> {
|
|
2
|
+
/**
|
|
3
|
+
* Record to be used in form
|
|
4
|
+
* @type {T}
|
|
5
|
+
*/
|
|
2
6
|
Record: T;
|
|
7
|
+
/**
|
|
8
|
+
* Field of the record to be edited
|
|
9
|
+
* @type {keyof T}
|
|
10
|
+
*/
|
|
3
11
|
Field: keyof T;
|
|
12
|
+
/**
|
|
13
|
+
* Setter function to update the Record
|
|
14
|
+
* @param record - Updated Record
|
|
15
|
+
*/
|
|
4
16
|
Setter: (record: T) => void;
|
|
17
|
+
/**
|
|
18
|
+
* Help message or element to display
|
|
19
|
+
* @type {string | JSX.Element}
|
|
20
|
+
* @optional
|
|
21
|
+
*/
|
|
5
22
|
Help?: string | JSX.Element;
|
|
23
|
+
/**
|
|
24
|
+
* Position to display radion buttons in
|
|
25
|
+
* @type {'vertical' | 'horizontal'}
|
|
26
|
+
* @optional
|
|
27
|
+
*/
|
|
6
28
|
Position?: ('vertical' | 'horizontal');
|
|
29
|
+
/**
|
|
30
|
+
* Options for the radion buttons
|
|
31
|
+
* @type {{ Value: string | number; Label: string, Disabled?: boolean }[]}
|
|
32
|
+
*/
|
|
7
33
|
Options: {
|
|
8
|
-
Value: string;
|
|
34
|
+
Value: string | number;
|
|
9
35
|
Label: string;
|
|
10
36
|
Disabled?: boolean;
|
|
11
37
|
}[];
|
|
38
|
+
/**
|
|
39
|
+
* Label to display for the form, defaults to the Field prop
|
|
40
|
+
* @type {string}
|
|
41
|
+
* @optional
|
|
42
|
+
*/
|
|
12
43
|
Label?: string;
|
|
13
44
|
}
|
|
14
45
|
export default function RadioButtons<T>(props: IProps<T>): JSX.Element;
|
package/lib/Select.d.ts
CHANGED
package/lib/Select.js
CHANGED
|
@@ -68,7 +68,7 @@ function Select(props) {
|
|
|
68
68
|
}
|
|
69
69
|
// Rretrieve the current value of the select field from the record.
|
|
70
70
|
function GetRecordValue() {
|
|
71
|
-
return props.Record[props.Field] == null ? '' : props.Record[props.Field]
|
|
71
|
+
return props.Record[props.Field] == null ? '' : props.Record[props.Field];
|
|
72
72
|
}
|
|
73
73
|
return (React.createElement("div", { className: "form-group" },
|
|
74
74
|
(props.Label !== "") ?
|