Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ exports[`1. Renderer:Picker base 1`] = `
class="cxd-PickerControl cxd-Form-control"
>
<div
class="cxd-Picker cxd-Picker--single is-focused"
class="cxd-Picker cxd-Picker--single"
>
<div
class="cxd-Picker-input is-focused"
class="cxd-Picker-input"
>
<div
class="cxd-Picker-placeholder"
Expand Down Expand Up @@ -258,10 +258,10 @@ exports[`1. Renderer:Picker base 2`] = `
class="cxd-PickerControl cxd-Form-control"
>
<div
class="cxd-Picker cxd-Picker--single is-focused"
class="cxd-Picker cxd-Picker--single"
>
<div
class="cxd-Picker-input is-focused"
class="cxd-Picker-input"
>
<div
class="cxd-Picker-valueWrap"
Expand Down
7 changes: 4 additions & 3 deletions packages/amis/src/renderers/Form/Picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,9 @@ export default class PickerControl extends React.PureComponent<
}

@autobind
handleFocus() {
handleFocus(e: React.MouseEvent<HTMLElement>) {
this.input.current && this.input.current.focus();
e.stopPropagation();
this.setState({
isFocused: true
});
Expand All @@ -471,7 +473,6 @@ export default class PickerControl extends React.PureComponent<

@autobind
handleClick() {
this.input.current && this.input.current.focus();
this.open();
}

Expand Down Expand Up @@ -816,7 +817,7 @@ export default class PickerControl extends React.PureComponent<
value={''}
ref={this.input}
onKeyDown={this.handleKeyDown}
onFocus={this.handleFocus}
onClick={this.handleFocus}
onBlur={this.handleBlur}
readOnly={mobileUI}
/>
Expand Down
Loading