Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v3] [datetime] fix: clicking shortcuts no longer dismisses popovers #5220

Merged
merged 1 commit into from
Apr 1, 2022
Merged
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
4 changes: 2 additions & 2 deletions packages/datetime/src/shortcuts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import * as React from "react";

import { Classes, Menu, MenuItem } from "@blueprintjs/core";
import { Menu, MenuItem } from "@blueprintjs/core";

import { DATERANGEPICKER_SHORTCUTS } from "./common/classes";
import { DateRange } from "./common/dateRange";
Expand Down Expand Up @@ -95,10 +95,10 @@ export class Shortcuts extends React.PureComponent<IShortcutsProps> {
const shortcutElements = shortcuts.map((shortcut, index) => (
<MenuItem
active={this.props.selectedShortcutIndex === index}
className={Classes.POPOVER_DISMISS_OVERRIDE}
disabled={!this.isShortcutInRange(shortcut.dateRange)}
key={index}
onClick={this.getShorcutClickHandler(shortcut, index)}
shouldDismissPopover={false}
text={shortcut.label}
/>
));
Expand Down