Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: placeholder #1079

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/Selector/SingleSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,6 @@ const SingleSelector: React.FC<SelectorProps> = (props) => {
attrs={pickAttrs(props, true)}
maxLength={combobox ? maxLength : undefined}
/>
{/* Display placeholder */}
{placeholderNode}
</span>

{/* Display value */}
Expand All @@ -121,6 +119,9 @@ const SingleSelector: React.FC<SelectorProps> = (props) => {
{item.label}
</span>
) : null}

{/* Display placeholder */}
{placeholderNode}
</span>
);
};
Expand Down
20 changes: 10 additions & 10 deletions tests/__snapshots__/Combobox.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ exports[`Select.Combobox renders controlled correctly 1`] = `
type="search"
value=""
/>
<span
class="rc-select-selection-placeholder"
>
Search
</span>
</span>
<span
class="rc-select-selection-placeholder"
>
Search
</span>
</span>
</div>
Expand Down Expand Up @@ -63,11 +63,11 @@ exports[`Select.Combobox renders correctly 1`] = `
type="search"
value=""
/>
<span
class="rc-select-selection-placeholder"
>
Search
</span>
</span>
<span
class="rc-select-selection-placeholder"
>
Search
</span>
</span>
</div>
Expand Down
2 changes: 1 addition & 1 deletion tests/__snapshots__/ssr.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

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>"`;
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>"`;
Loading