EnxDev commented on code in PR #45680:
URL: https://github.com/apache/superset/pull/45680#discussion_r4431273528


##########
superset-frontend/src/explore/components/controls/FilterControl/AdhocFilter/index.ts:
##########
@@ -61,6 +61,32 @@ interface AdhocFilterInput {
   [key: string]: unknown;
 }
 
+function subjectForPill(
+  subject: AdhocFilterInput['subject'],
+): string | undefined {
+  if (!subject || typeof subject !== 'object' || subject.column_name) {
+    return undefined;
+  }
+  return typeof subject.label === 'string' ? subject.label : undefined;

Review Comment:
   The pill label is right, but opening it lands on the Simple tab with a blank 
column picker. `AdhocFilterEditPopoverSimpleTabContent` only resolves a string 
subject or one with `column_name`, so the Custom SQL bucket shows up as just `= 
2021-01-01T00:00:00`.
   
   Value edits still go through, so a follow-up is fine. Could the picker fall 
back to the adhoc label the same way?



-- 
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]

Reply via email to