eric-briscoe commented on code in PR #20754:
URL: https://github.com/apache/superset/pull/20754#discussion_r924882355
##########
superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSimpleTabContent/index.tsx:
##########
@@ -359,7 +359,7 @@ const AdhocFilterEditPopoverSimpleTabContent:
React.FC<Props> = props => {
const col = props.adhocFilter.subject;
const having = props.adhocFilter.clause === CLAUSES.HAVING;
- if (col && datasource && datasource.filter_select && !having) {
+ if (col && datasource?.filter_select !== false && !having) {
Review Comment:
If we are adding the "filter_select": true in sql_lab.py we can remove this
change. If we keep this change we don't need to make the change in sql_lab.py.
If we do keep this change, I realized we should actually do a check on
datasource because datasource. operations are used within the if block. so
recommend changing to this this:
`if (col && datasource && datasource.filter_select !== false && !having) {`
##########
superset/models/sql_lab.py:
##########
@@ -212,6 +212,7 @@ def columns(self) -> List[ResultSetColumnType]:
@property
def data(self) -> Dict[str, Any]:
return {
+ "filter_select": True,
Review Comment:
Related to my comment in the frontend change. If we add this here, the
frontend change should not be needed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]