|
@@ -118,6 +118,7 @@ export type SelectProps = {
|
|
autoClearSearchValue?: boolean;
|
|
autoClearSearchValue?: boolean;
|
|
arrowIcon?: React.ReactNode;
|
|
arrowIcon?: React.ReactNode;
|
|
borderless?: boolean;
|
|
borderless?: boolean;
|
|
|
|
+ showArrowInBorderless?: boolean;
|
|
clearIcon?: React.ReactNode;
|
|
clearIcon?: React.ReactNode;
|
|
defaultValue?: string | number | any[] | Record<string, any>;
|
|
defaultValue?: string | number | any[] | Record<string, any>;
|
|
value?: string | number | any[] | Record<string, any>;
|
|
value?: string | number | any[] | Record<string, any>;
|
|
@@ -354,6 +355,7 @@ class Select extends BaseComponent<SelectProps, SelectState> {
|
|
restTagsPopoverProps: {},
|
|
restTagsPopoverProps: {},
|
|
expandRestTagsOnClick: false,
|
|
expandRestTagsOnClick: false,
|
|
ellipsisTrigger: false,
|
|
ellipsisTrigger: false,
|
|
|
|
+ showArrowInBorderless: false,
|
|
// Radio selection is different from the default renderSelectedItem for multiple selection, so it is not declared here
|
|
// Radio selection is different from the default renderSelectedItem for multiple selection, so it is not declared here
|
|
// renderSelectedItem: (optionNode) => optionNode.label,
|
|
// renderSelectedItem: (optionNode) => optionNode.label,
|
|
// The default creator rendering is related to i18, so it is not declared here
|
|
// The default creator rendering is related to i18, so it is not declared here
|
|
@@ -923,7 +925,7 @@ class Select extends BaseComponent<SelectProps, SelectState> {
|
|
ref={this.setOptionContainerEl}
|
|
ref={this.setOptionContainerEl}
|
|
onKeyDown={e => this.foundation.handleContainerKeyDown(e)}
|
|
onKeyDown={e => this.foundation.handleContainerKeyDown(e)}
|
|
>
|
|
>
|
|
- {outerTopSlot ? <div className={`${prefixcls}-option-list-outer-top-slot`} onMouseEnter={() => this.foundation.handleSlotMouseEnter()}>{outerTopSlot}</div> : null }
|
|
|
|
|
|
+ {outerTopSlot ? <div className={`${prefixcls}-option-list-outer-top-slot`} onMouseEnter={() => this.foundation.handleSlotMouseEnter()}>{outerTopSlot}</div> : null}
|
|
<div
|
|
<div
|
|
style={{ maxHeight: `${maxHeight}px` }}
|
|
style={{ maxHeight: `${maxHeight}px` }}
|
|
className={optionListCls}
|
|
className={optionListCls}
|
|
@@ -931,11 +933,11 @@ class Select extends BaseComponent<SelectProps, SelectState> {
|
|
aria-multiselectable={multiple}
|
|
aria-multiselectable={multiple}
|
|
onScroll={e => this.foundation.handleListScroll(e)}
|
|
onScroll={e => this.foundation.handleListScroll(e)}
|
|
>
|
|
>
|
|
- {innerTopSlot ? <div className={`${prefixcls}-option-list-inner-top-slot`} onMouseEnter={() => this.foundation.handleSlotMouseEnter()}>{innerTopSlot}</div> : null }
|
|
|
|
|
|
+ {innerTopSlot ? <div className={`${prefixcls}-option-list-inner-top-slot`} onMouseEnter={() => this.foundation.handleSlotMouseEnter()}>{innerTopSlot}</div> : null}
|
|
{loading ? this.renderLoading() : isEmpty ? this.renderEmpty() : listContent}
|
|
{loading ? this.renderLoading() : isEmpty ? this.renderEmpty() : listContent}
|
|
- {innerBottomSlot ? <div className={`${prefixcls}-option-list-inner-bottom-slot`} onMouseEnter={() => this.foundation.handleSlotMouseEnter()}>{innerBottomSlot}</div> : null }
|
|
|
|
|
|
+ {innerBottomSlot ? <div className={`${prefixcls}-option-list-inner-bottom-slot`} onMouseEnter={() => this.foundation.handleSlotMouseEnter()}>{innerBottomSlot}</div> : null}
|
|
</div>
|
|
</div>
|
|
- {outerBottomSlot ? <div className={`${prefixcls}-option-list-outer-bottom-slot`} onMouseEnter={() => this.foundation.handleSlotMouseEnter()}>{outerBottomSlot}</div> : null }
|
|
|
|
|
|
+ {outerBottomSlot ? <div className={`${prefixcls}-option-list-outer-bottom-slot`} onMouseEnter={() => this.foundation.handleSlotMouseEnter()}>{outerBottomSlot}</div> : null}
|
|
</div>
|
|
</div>
|
|
);
|
|
);
|
|
}
|
|
}
|
|
@@ -1309,6 +1311,7 @@ class Select extends BaseComponent<SelectProps, SelectState> {
|
|
arrowIcon,
|
|
arrowIcon,
|
|
clearIcon,
|
|
clearIcon,
|
|
borderless,
|
|
borderless,
|
|
|
|
+ showArrowInBorderless,
|
|
...rest
|
|
...rest
|
|
} = this.props;
|
|
} = this.props;
|
|
|
|
|
|
@@ -1319,6 +1322,7 @@ class Select extends BaseComponent<SelectProps, SelectState> {
|
|
cls(className) :
|
|
cls(className) :
|
|
cls(prefixcls, className, {
|
|
cls(prefixcls, className, {
|
|
[`${prefixcls}-borderless`]: borderless,
|
|
[`${prefixcls}-borderless`]: borderless,
|
|
|
|
+ [`${prefixcls}-borderless-arrow`]: showArrowInBorderless,
|
|
[`${prefixcls}-open`]: isOpen,
|
|
[`${prefixcls}-open`]: isOpen,
|
|
[`${prefixcls}-focus`]: isFocus,
|
|
[`${prefixcls}-focus`]: isFocus,
|
|
[`${prefixcls}-disabled`]: disabled,
|
|
[`${prefixcls}-disabled`]: disabled,
|