Skip to content

Commit

Permalink
fix(input): add input width 100% in form (#1738)
Browse files Browse the repository at this point in the history
* fix(input)-add-input-width-100%-in-form

* style: dummy commit

* fix(commit): dummy commit

Co-authored-by: Zhang Rui <zhangrui@growingio.com>
  • Loading branch information
Ryan Zhang and Zhang Rui committed Dec 24, 2021
1 parent 31d1351 commit 0b167a2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
12 changes: 12 additions & 0 deletions src/form/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
@form-prefix-cls: ~'@{component-prefix}-form';
@field-prefix-cls: ~'@{component-prefix}-field';
@input-prefix-cls: ~'@{component-prefix}-input';
@textarea-prefix-cls: ~'@{component-prefix}-textarea';

// form tokens map
@info-color: @blue-3;
Expand Down Expand Up @@ -172,6 +173,17 @@
}
}
}

.@{field-prefix-cls}-control {
&-input {
.@{input-prefix-cls} {
width: 100%;
}
.@{textarea-prefix-cls} {
width: 100%;
}
}
}
}

&-inline {
Expand Down
10 changes: 9 additions & 1 deletion src/popconfirm/PopConfirm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const PopConfirm: React.FC<PopConfirmProps> = (props) => {
defaultVisible,
children,
disabled,
trigger = 'click',
...rest
} = props;
const prefixCls = usePrefixCls('confirm', customizePrefixCls);
Expand Down Expand Up @@ -85,7 +86,14 @@ const PopConfirm: React.FC<PopConfirmProps> = (props) => {
</div>
);
return (
<Popover {...rest} visible={visible} enterable onVisibleChange={onVisibleChange} content={content}>
<Popover
{...rest}
trigger={trigger}
visible={visible}
enterable
onVisibleChange={onVisibleChange}
content={content}
>
{children}
</Popover>
);
Expand Down
1 change: 0 additions & 1 deletion src/search-bar/SearchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ const SearchBar = React.forwardRef<HTMLInputElement, SearchBarProps>((props, ref
setValue('');
}
}, [onSearch, disabled]);

useEffect(() => {
if (value !== enterValue) {
setValue(enterValue);
Expand Down

1 comment on commit 0b167a2

@vercel
Copy link

@vercel vercel bot commented on 0b167a2 Dec 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.