Skip to content

Commit

Permalink
fix(ui-time-select): make allowClearingSelection an optional prop
Browse files Browse the repository at this point in the history
This was never intended as a required prop.
  • Loading branch information
matyasf committed Feb 21, 2025
1 parent 1e83164 commit fc1264c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/ui-time-select/src/TimeSelect/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ class TimeSelect extends Component<TimeSelectProps, TimeSelectState> {
? this.state.selectedOptionId
: undefined,
fireChangeOnBlur: undefined,
isInputCleared: this.props.allowClearingSelection && value === ''
isInputCleared: this.props.allowClearingSelection! && value === ''
})
}
this.setState({
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-time-select/src/TimeSelect/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ type TimeSelectOwnProps = {
* Whether to allow for the user to clear the selected option in the input field.
* If `false`, the input field will return the last selected option after the input is cleared and loses focus.
*/
allowClearingSelection: boolean
allowClearingSelection?: boolean
}

const propTypes: PropValidators<PropKeys> = {
Expand Down

0 comments on commit fc1264c

Please sign in to comment.