Skip to content

Commit be21dff

Browse files
committed
chore: more className
1 parent baff05d commit be21dff

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/SelectInput/Content/SingleContent.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,11 @@ const SingleContent = React.forwardRef<HTMLInputElement, SharedContentProps>(
8686
// Render
8787
return (
8888
<div
89-
className={clsx(`${prefixCls}-content`, classNames?.content)}
89+
className={clsx(
90+
`${prefixCls}-content`,
91+
displayValue && `${prefixCls}-content-has-value`,
92+
classNames?.content,
93+
)}
9094
style={styles?.content}
9195
title={hasOptionStyle ? undefined : optionTitle}
9296
>

tests/__snapshots__/Select.test.tsx.snap

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ exports[`Select.Basic render renders aria-attributes correctly 1`] = `
111111
class="antd select-test antd-single antd-allow-clear antd-show-search"
112112
>
113113
<div
114-
class="antd-content"
114+
class="antd-content antd-content-has-value"
115115
title="2"
116116
>
117117
2
@@ -142,7 +142,7 @@ exports[`Select.Basic render renders correctly 1`] = `
142142
class="antd select-test antd-single antd-allow-clear antd-show-search"
143143
>
144144
<div
145-
class="antd-content"
145+
class="antd-content antd-content-has-value"
146146
title="2"
147147
>
148148
2
@@ -173,7 +173,7 @@ exports[`Select.Basic render renders data-attributes correctly 1`] = `
173173
data-test="test-id"
174174
>
175175
<div
176-
class="antd-content"
176+
class="antd-content antd-content-has-value"
177177
title="2"
178178
>
179179
2
@@ -202,7 +202,7 @@ exports[`Select.Basic render renders disabled select correctly 1`] = `
202202
class="antd select-test antd-single antd-disabled antd-show-search"
203203
>
204204
<div
205-
class="antd-content"
205+
class="antd-content antd-content-has-value"
206206
title="2"
207207
>
208208
2
@@ -229,7 +229,7 @@ exports[`Select.Basic render renders role prop correctly 1`] = `
229229
class="antd select-test antd-single antd-allow-clear antd-show-search"
230230
>
231231
<div
232-
class="antd-content"
232+
class="antd-content antd-content-has-value"
233233
title="2"
234234
>
235235
2

0 commit comments

Comments
 (0)