@xqmsg/ui-core 0.24.7 → 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 +13 -4
- 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 +13 -4
- package/dist/ui-core.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/input/StackedMultiSelect/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
|
@@ -339,7 +339,6 @@ const StackedMultiSelect = React.forwardRef<
|
|
|
339
339
|
width="0"
|
|
340
340
|
autoComplete="off"
|
|
341
341
|
type="text"
|
|
342
|
-
ref={inputRef}
|
|
343
342
|
tabIndex={-1}
|
|
344
343
|
_focus={{ boxShadow: 'none !important' }}
|
|
345
344
|
/>
|
|
@@ -357,6 +356,7 @@ const StackedMultiSelect = React.forwardRef<
|
|
|
357
356
|
loading={loadingOptions}
|
|
358
357
|
>
|
|
359
358
|
<Input
|
|
359
|
+
ref={inputRef}
|
|
360
360
|
value={searchValue}
|
|
361
361
|
onChange={handleInput}
|
|
362
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
|
/>
|