mirror of
https://github.com/desktop/desktop
synced 2024-11-05 20:49:32 +00:00
Force click on item to switch
This commit is contained in:
parent
bf823d2b3f
commit
1c0e0914f6
1 changed files with 1 additions and 6 deletions
|
@ -76,14 +76,10 @@ export class BranchSelect extends React.Component<
|
|||
|
||||
private onItemClick = (branch: Branch, source: ClickSource) => {
|
||||
source.event.preventDefault()
|
||||
this.setState({ showBranchDropdown: false })
|
||||
this.setState({ showBranchDropdown: false, selectedBranch: branch })
|
||||
this.props.onChange?.(branch)
|
||||
}
|
||||
|
||||
private onSelectionChanged = async (selectedBranch: Branch | null) => {
|
||||
this.setState({ selectedBranch })
|
||||
}
|
||||
|
||||
private onFilterTextChanged = (filterText: string) => {
|
||||
this.setState({ filterText })
|
||||
}
|
||||
|
@ -112,7 +108,6 @@ export class BranchSelect extends React.Component<
|
|||
filterText={filterText}
|
||||
onFilterTextChanged={this.onFilterTextChanged}
|
||||
selectedBranch={selectedBranch}
|
||||
onSelectionChanged={this.onSelectionChanged}
|
||||
canCreateNewBranch={false}
|
||||
renderBranch={this.renderBranch}
|
||||
onItemClick={this.onItemClick}
|
||||
|
|
Loading…
Reference in a new issue