Skip to content

Commit

Permalink
Fix time picker quick select (elastic#34354)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasolson committed Apr 2, 2019
1 parent aecaffc commit 379dc9f
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/legacy/ui/public/query_bar/components/query_bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -380,16 +380,21 @@ export class QueryBarUI extends Component<Props, State> {
start,
end,
isInvalid,
isQuickSelection,
}: {
start: string;
end: string;
isInvalid: boolean;
isQuickSelection: boolean;
}) => {
this.setState({
dateRangeFrom: start,
dateRangeTo: end,
isDateRangeInvalid: isInvalid,
});
this.setState(
{
dateRangeFrom: start,
dateRangeTo: end,
isDateRangeInvalid: isInvalid,
},
() => isQuickSelection && this.onSubmit()
);
};

public onKeyUp = (event: React.KeyboardEvent<HTMLInputElement>) => {
Expand Down

0 comments on commit 379dc9f

Please sign in to comment.