Skip to content
Snippets Groups Projects
Unverified Commit 5ddd3c68 authored by Ariya Hidayat's avatar Ariya Hidayat Committed by GitHub
Browse files

Custom expression editor: Esc hides the suggestion list/help text (#20477)

parent 4ae10228
No related branches found
No related tags found
No related merge requests found
......@@ -395,6 +395,13 @@ export default class ExpressionEditorTextfield extends React.Component {
this.chooseSuggestion();
},
},
{
name: "clearSuggestions",
bindKey: { win: "Esc", mac: "Esc" },
exec: () => {
this.clearSuggestions();
},
},
];
render() {
......
......@@ -697,6 +697,20 @@ describe("scenarios > question > filter", () => {
.and("contains", "Button");
});
it("should allow hiding the suggestion list with Escape", () => {
openOrdersTable({ mode: "notebook" });
filter({ mode: "notebook" });
cy.findByText("Custom Expression").click();
// Try to auto-complete Tax
cy.get(".ace_text-input").type("Ta");
cy.findByText("Tax");
// Esc closes the suggestion popover
cy.realPress("{esc}");
cy.findByText("Tax").should("not.exist");
});
it.skip("should work on twice summarized questions (metabase#15620)", () => {
visitQuestionAdhoc({
dataset_query: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment