File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
src/components/fields/TextInputMapper Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @cube-dev/ui-kit ' : patch
3+ ---
4+
5+ Improve TextInputMapper styles inside Form.'
Original file line number Diff line number Diff line change 99
1010import { useEvent } from '../../../_internal/hooks' ;
1111import { FieldBaseProps } from '../../../shared' ;
12+ import { mergeProps } from '../../../utils/react/index' ;
1213import { useFieldProps , useFormProps , wrapWithField } from '../../form' ;
1314import { CloseIcon , PlusIcon } from '../../../icons' ;
1415import { Button } from '../../actions' ;
@@ -34,6 +35,19 @@ export interface CubeTextInputMapperProps extends FieldBaseProps {
3435 valueProps ?: Partial < CubeTextInputMapperInputProps > ;
3536}
3637
38+ // Rewrites upper level field component styles
39+ // @TODO : Remove this after the release of new Element API
40+ const PROPS_GRID_HACK = {
41+ styles : {
42+ InputArea : {
43+ gridColumn : {
44+ '' : 'auto' ,
45+ 'has-sider' : 'auto' ,
46+ } ,
47+ } ,
48+ } ,
49+ } ;
50+
3751// remove duplicates in mappings
3852function removeDuplicates ( mappings : Mapping [ ] ) {
3953 const keys = new Set < string > ( ) ;
@@ -254,7 +268,7 @@ function TextInputMapperInput(props: CubeTextInputMapperInputProps) {
254268 < TextInput
255269 qa = "AddMapping"
256270 width = "auto"
257- { ...rest }
271+ { ...mergeProps ( rest , PROPS_GRID_HACK ) }
258272 id = { undefined }
259273 value = { value }
260274 labelPosition = "top"
You can’t perform that action at this time.
0 commit comments