You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2020/05/06 04:43:50 UTC
[incubator-superset] branch master updated: fix: autocomplete
search in AdhocFilter operator dropdown (#9654)
This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new 67d8b63 fix: autocomplete search in AdhocFilter operator dropdown (#9654)
67d8b63 is described below
commit 67d8b634b885088b9977d04dc7dae1af8d180bfd
Author: Maxime Beauchemin <ma...@gmail.com>
AuthorDate: Tue May 5 21:43:33 2020 -0700
fix: autocomplete search in AdhocFilter operator dropdown (#9654)
Searching for 'equ' in AdhocFilter's operator dropdown doesn't find the
options who's label contain that substring.
I'd write a unit test but it's pretty tricky.
---
.../explore/components/AdhocFilterEditPopoverSimpleTabContent.jsx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/superset-frontend/src/explore/components/AdhocFilterEditPopoverSimpleTabContent.jsx b/superset-frontend/src/explore/components/AdhocFilterEditPopoverSimpleTabContent.jsx
index eadaa54..47bf948 100644
--- a/superset-frontend/src/explore/components/AdhocFilterEditPopoverSimpleTabContent.jsx
+++ b/superset-frontend/src/explore/components/AdhocFilterEditPopoverSimpleTabContent.jsx
@@ -313,7 +313,11 @@ export default class AdhocFilterEditPopoverSimpleTabContent extends React.Compon
.filter(operator =>
this.isOperatorRelevant(operator, adhocFilter.subject),
)
- .map(operator => ({ operator })),
+ .map(operator => ({
+ operator,
+ label: translateOperator(operator),
+ value: operator,
+ })),
value: adhocFilter.operator,
onChange: this.onOperatorChange,
optionRenderer: VirtualizedRendererWrap(operator =>