Skip to content

Commit

Permalink
adds support for closeOnChange when removing items
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenrick committed Aug 29, 2024
1 parent 1623c8d commit 34dedbd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/modules/Dropdown/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ class DropdownInner extends Component {

this.setState({ value: newValue })
this.handleChange(e, newValue)
this.closeOnChange(e)
}

closeOnDocumentClick = (e) => {
Expand Down Expand Up @@ -701,6 +702,7 @@ class DropdownInner extends Component {

this.setState({ value: newValue })
this.handleChange(e, newValue)
this.closeOnChange(e)
}

getSelectedIndexAfterMove = (offset, startIndex = this.state.selectedIndex) => {
Expand Down

0 comments on commit 34dedbd

Please sign in to comment.