pcm-shared-components 0.0.174 → 0.0.178
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.
|
@@ -21,6 +21,8 @@ let debounce;
|
|
|
21
21
|
|
|
22
22
|
export const CurrencyTextInput = props => {
|
|
23
23
|
const {
|
|
24
|
+
id,
|
|
25
|
+
name,
|
|
24
26
|
value,
|
|
25
27
|
label,
|
|
26
28
|
variant,
|
|
@@ -158,18 +160,21 @@ export const CurrencyTextInput = props => {
|
|
|
158
160
|
|
|
159
161
|
const handleOnChange = event => {
|
|
160
162
|
setLocalValue(event.target.value);
|
|
161
|
-
onChange(event
|
|
163
|
+
onChange(event);
|
|
162
164
|
};
|
|
163
165
|
|
|
164
166
|
return /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
165
167
|
theme: defaultTheme
|
|
166
168
|
}, /*#__PURE__*/React.createElement(TextField, {
|
|
167
|
-
id:
|
|
169
|
+
id: id,
|
|
170
|
+
name: name,
|
|
168
171
|
className: ` ${className}`,
|
|
169
172
|
fullWidth: fullWidth,
|
|
170
173
|
label: label,
|
|
171
174
|
value: handleCurrencyFormatting(value),
|
|
172
|
-
onChange:
|
|
175
|
+
onChange: event => {
|
|
176
|
+
handleOnChange(event);
|
|
177
|
+
},
|
|
173
178
|
inputProps: {
|
|
174
179
|
autoComplete: "new-password",
|
|
175
180
|
style: {
|
|
@@ -188,6 +193,8 @@ export const CurrencyTextInput = props => {
|
|
|
188
193
|
};
|
|
189
194
|
export default CurrencyTextInput;
|
|
190
195
|
CurrencyTextInput.defaultProps = {
|
|
196
|
+
id: '',
|
|
197
|
+
name: '',
|
|
191
198
|
value: 0,
|
|
192
199
|
label: 'Some Label',
|
|
193
200
|
variant: 'outlined',
|
|
@@ -206,6 +213,12 @@ CurrencyTextInput.defaultProps = {
|
|
|
206
213
|
theme: undefined
|
|
207
214
|
};
|
|
208
215
|
CurrencyTextInput.propTypes = {
|
|
216
|
+
/** Unique id of the component */
|
|
217
|
+
id: PropTypes.string,
|
|
218
|
+
|
|
219
|
+
/** Name of the target often used to update state*/
|
|
220
|
+
name: PropTypes.string,
|
|
221
|
+
|
|
209
222
|
/** Value to be enter and display in input */
|
|
210
223
|
value: PropTypes.string,
|
|
211
224
|
|