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

chore: merge master into feature #33163

Merged
merged 17 commits into from
Dec 5, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix: Select width bug when searching (#32988)
* fix: select placeholder should take place when searching

close #27688

* fix snapshot
  • Loading branch information
afc163 authored Dec 2, 2021
commit e49a451650bda323ce129df00e8bfe657d07dd3e
Original file line number Diff line number Diff line change
Expand Up @@ -1711,7 +1711,6 @@ exports[`renders ./components/select/demo/responsive.md correctly 1`] = `
exports[`renders ./components/select/demo/search.md correctly 1`] = `
<div
class="ant-select ant-select-single ant-select-show-arrow ant-select-show-search"
style="width:200px"
>
<div
class="ant-select-selector"
Expand Down
11 changes: 0 additions & 11 deletions components/select/demo/search.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,16 @@ function onChange(value) {
console.log(`selected ${value}`);
}

function onBlur() {
console.log('blur');
}

function onFocus() {
console.log('focus');
}

function onSearch(val) {
console.log('search:', val);
}

ReactDOM.render(
<Select
showSearch
style={{ width: 200 }}
placeholder="Select a person"
optionFilterProp="children"
onChange={onChange}
onFocus={onFocus}
onBlur={onBlur}
onSearch={onSearch}
filterOption={(input, option) =>
option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
Expand Down
1 change: 1 addition & 0 deletions components/select/style/single.less
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
}

.@{select-prefix-cls}-selection-placeholder {
transition: none;
pointer-events: none;
}

Expand Down