From 30c6ec579b39c3cee669c5b41cce7fb6b38a2246 Mon Sep 17 00:00:00 2001 From: rickcole Date: Tue, 28 Apr 2020 20:20:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scss/components/form/_nested-select.scss | 5 ++++- src/renderers/Form/NestedSelect.tsx | 18 +++--------------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/scss/components/form/_nested-select.scss b/scss/components/form/_nested-select.scss index 40aa2f0da..5038b5fcb 100644 --- a/scss/components/form/_nested-select.scss +++ b/scss/components/form/_nested-select.scss @@ -109,7 +109,7 @@ } &-menu { - min-width: px2rem(120px); + width: px2rem(160px); max-height: px2rem(300px); background: $Form-select-menu-bg; color: $Form-select-menu-color; @@ -134,6 +134,9 @@ > label { flex: 1; cursor: pointer; + span { + display: inline-flex; + } } &.is-active { diff --git a/src/renderers/Form/NestedSelect.tsx b/src/renderers/Form/NestedSelect.tsx index 5e543dad5..3d7d5f7f8 100644 --- a/src/renderers/Form/NestedSelect.tsx +++ b/src/renderers/Form/NestedSelect.tsx @@ -417,11 +417,7 @@ export default class NestedSelectControl extends React.Component< return ( <> {stack.map((options, index) => ( -
+
{index === 0 ? searchInput : null} {multiple && index === 0 ? (
-
+
{this.renderOptions()}
@@ -534,12 +527,7 @@ export default class NestedSelectControl extends React.Component< target={this.getTarget} show > - - {body} - + {body} ); }