Skip to content

Commit

Permalink
style:condition下拉框样式细节优化,避免内容过多导致超长
Browse files Browse the repository at this point in the history
  • Loading branch information
hezhihang committed Sep 3, 2024
1 parent d2b9439 commit 1afe01a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/amis-ui/scss/components/form/_selection.scss
Original file line number Diff line number Diff line change
Expand Up @@ -476,4 +476,8 @@
&-input.is-active &-caret {
transform: rotate(180deg);
}

&-searchbox.is-active {
width: 100%;
}
}
5 changes: 4 additions & 1 deletion packages/amis-ui/src/components/DropDownSelection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,20 @@ class DropDownSelection extends BaseSelection<
loadingConfig,
popOverContainer,
testIdBuilder,
mobileUI
mobileUI,
classPrefix: ns
} = this.props;

return (
<PopOverContainer
mobileUI={mobileUI}
overlayWidthField="width"
popOverContainer={popOverContainer || (() => findDOMNode(this))}
popOverRender={({onClose}) => (
<div>
{searchable ? (
<SearchBox
className={cx(`${ns}DropDownSelection-searchbox`)}
mini={false}
onSearch={this.onSearch}
testIdBuilder={testIdBuilder?.getChild('searchbox')}
Expand Down

0 comments on commit 1afe01a

Please sign in to comment.