Skip to content

Commit 7220259

Browse files
committed
fix: input-search support addonAfter and addonBefore slot #581
1 parent fc72620 commit 7220259

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: components/input/Search.jsx

+4
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ export default {
7777
const { prefixCls, inputPrefixCls, size, ...others } = getOptionProps(this);
7878
const suffix = getComponentFromProp(this, 'suffix');
7979
const enterButton = getComponentFromProp(this, 'enterButton');
80+
const addonAfter = getComponentFromProp(this, 'addonAfter');
81+
const addonBefore = getComponentFromProp(this, 'addonBefore');
8082
const buttonOrIcon = this.getButtonOrIcon();
8183
let searchSuffix = suffix ? [suffix, buttonOrIcon] : buttonOrIcon;
8284
if (Array.isArray(searchSuffix)) {
@@ -99,6 +101,8 @@ export default {
99101
prefixCls: inputPrefixCls,
100102
size,
101103
suffix: searchSuffix,
104+
addonAfter,
105+
addonBefore,
102106
},
103107
attrs: this.$attrs,
104108
on: {

0 commit comments

Comments
 (0)