@xqmsg/ui-core 0.24.6 → 0.24.8
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/dist/ui-core.cjs.development.js +16 -6
- package/dist/ui-core.cjs.development.js.map +1 -1
- package/dist/ui-core.cjs.production.min.js +1 -1
- package/dist/ui-core.cjs.production.min.js.map +1 -1
- package/dist/ui-core.esm.js +16 -6
- package/dist/ui-core.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/input/StackedMultiSelect/index.tsx +5 -2
- package/src/components/input/StackedPilledInput/index.tsx +1 -1
- package/src/components/input/StackedSelect/index.tsx +1 -0
- package/src/components/input/index.tsx +9 -0
package/package.json
CHANGED
|
@@ -74,7 +74,10 @@ const StackedMultiSelect = React.forwardRef<
|
|
|
74
74
|
}
|
|
75
75
|
}, [boundingClientRect]);
|
|
76
76
|
|
|
77
|
-
useOnClickOutside(dropdownRef, () =>
|
|
77
|
+
useOnClickOutside(dropdownRef, () => {
|
|
78
|
+
setSearchValue('');
|
|
79
|
+
setIsFocussed(false);
|
|
80
|
+
});
|
|
78
81
|
|
|
79
82
|
// gets latest watched form value (common delimited) from RHF state and creates a list
|
|
80
83
|
useEffect(() => {
|
|
@@ -336,7 +339,6 @@ const StackedMultiSelect = React.forwardRef<
|
|
|
336
339
|
width="0"
|
|
337
340
|
autoComplete="off"
|
|
338
341
|
type="text"
|
|
339
|
-
ref={inputRef}
|
|
340
342
|
tabIndex={-1}
|
|
341
343
|
_focus={{ boxShadow: 'none !important' }}
|
|
342
344
|
/>
|
|
@@ -354,6 +356,7 @@ const StackedMultiSelect = React.forwardRef<
|
|
|
354
356
|
loading={loadingOptions}
|
|
355
357
|
>
|
|
356
358
|
<Input
|
|
359
|
+
ref={inputRef}
|
|
357
360
|
value={searchValue}
|
|
358
361
|
onChange={handleInput}
|
|
359
362
|
disabled={loadingOptions}
|
|
@@ -219,6 +219,7 @@ const StackedSelect = React.forwardRef<HTMLInputElement, StackedSelectProps>(
|
|
|
219
219
|
autoComplete="off"
|
|
220
220
|
onChange={handleInput}
|
|
221
221
|
onKeyDown={handleOnKeyDown}
|
|
222
|
+
disabled={disabled}
|
|
222
223
|
/>
|
|
223
224
|
<InputRightElement
|
|
224
225
|
cursor={disabled ? 'not-allowed' : 'pointer'}
|
|
@@ -93,6 +93,10 @@ export function Input<T extends FieldValues>({
|
|
|
93
93
|
ref: RefCallBack,
|
|
94
94
|
value: string
|
|
95
95
|
) {
|
|
96
|
+
if (inputType === 'text') {
|
|
97
|
+
console.log(errorText);
|
|
98
|
+
console.log(isInvalid);
|
|
99
|
+
}
|
|
96
100
|
switch (inputType) {
|
|
97
101
|
case 'text':
|
|
98
102
|
return (
|
|
@@ -115,6 +119,8 @@ export function Input<T extends FieldValues>({
|
|
|
115
119
|
value={value}
|
|
116
120
|
variant={variant}
|
|
117
121
|
label={label as string}
|
|
122
|
+
setError={setError as UseFormSetError<FieldValues>}
|
|
123
|
+
clearErrors={clearErrors as UseFormClearErrors<FieldValues>}
|
|
118
124
|
/>
|
|
119
125
|
);
|
|
120
126
|
case 'radio':
|
|
@@ -145,6 +151,8 @@ export function Input<T extends FieldValues>({
|
|
|
145
151
|
onBlur={onBlur}
|
|
146
152
|
setValue={setValue as UseFormSetValue<FieldValues>}
|
|
147
153
|
control={control as Control<FieldValues, any>}
|
|
154
|
+
setError={setError as UseFormSetError<FieldValues>}
|
|
155
|
+
clearErrors={clearErrors as UseFormClearErrors<FieldValues>}
|
|
148
156
|
ref={ref}
|
|
149
157
|
disabled={disabled}
|
|
150
158
|
value={value}
|
|
@@ -296,6 +304,7 @@ export function Input<T extends FieldValues>({
|
|
|
296
304
|
)}
|
|
297
305
|
{isInvalid && <FormErrorMessage>{errorText}</FormErrorMessage>}
|
|
298
306
|
{helperText && <FormHelperText>{helperText}</FormHelperText>}
|
|
307
|
+
{errorText} {isInvalid?.toString()}
|
|
299
308
|
</FormControl>
|
|
300
309
|
)}
|
|
301
310
|
/>
|