Skip to content

Commit ad94b3b

Browse files
authored
fix: placeholder (#1079)
1 parent 9a3074d commit ad94b3b

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

src/Selector/SingleSelector.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,6 @@ const SingleSelector: React.FC<SelectorProps> = (props) => {
104104
attrs={pickAttrs(props, true)}
105105
maxLength={combobox ? maxLength : undefined}
106106
/>
107-
{/* Display placeholder */}
108-
{placeholderNode}
109107
</span>
110108

111109
{/* Display value */}
@@ -121,6 +119,9 @@ const SingleSelector: React.FC<SelectorProps> = (props) => {
121119
{item.label}
122120
</span>
123121
) : null}
122+
123+
{/* Display placeholder */}
124+
{placeholderNode}
124125
</span>
125126
);
126127
};

tests/__snapshots__/Combobox.test.tsx.snap

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ exports[`Select.Combobox renders controlled correctly 1`] = `
2626
type="search"
2727
value=""
2828
/>
29-
<span
30-
class="rc-select-selection-placeholder"
31-
>
32-
Search
33-
</span>
29+
</span>
30+
<span
31+
class="rc-select-selection-placeholder"
32+
>
33+
Search
3434
</span>
3535
</span>
3636
</div>
@@ -63,11 +63,11 @@ exports[`Select.Combobox renders correctly 1`] = `
6363
type="search"
6464
value=""
6565
/>
66-
<span
67-
class="rc-select-selection-placeholder"
68-
>
69-
Search
70-
</span>
66+
</span>
67+
<span
68+
class="rc-select-selection-placeholder"
69+
>
70+
Search
7171
</span>
7272
</span>
7373
</div>

tests/__snapshots__/ssr.test.tsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`Select.SSR should work 1`] = `"<div class="rc-select rc-select-single"><div class="rc-select-selector"><span class="rc-select-selection-wrap"><span class="rc-select-selection-search"><input type="search" autoComplete="off" class="rc-select-selection-search-input" role="combobox" aria-expanded="false" aria-haspopup="listbox" aria-owns="undefined_list" aria-autocomplete="list" aria-controls="undefined_list" readonly="" unselectable="on" style="opacity:0" value=""/><span class="rc-select-selection-placeholder"></span></span></span></div></div>"`;
3+
exports[`Select.SSR should work 1`] = `"<div class="rc-select rc-select-single"><div class="rc-select-selector"><span class="rc-select-selection-wrap"><span class="rc-select-selection-search"><input type="search" autoComplete="off" class="rc-select-selection-search-input" role="combobox" aria-expanded="false" aria-haspopup="listbox" aria-owns="undefined_list" aria-autocomplete="list" aria-controls="undefined_list" readonly="" unselectable="on" style="opacity:0" value=""/></span><span class="rc-select-selection-placeholder"></span></span></div></div>"`;

0 commit comments

Comments
 (0)