bito-code-review[bot] commented on code in PR #37141:
URL: https://github.com/apache/superset/pull/37141#discussion_r2824930223


##########
superset-frontend/src/components/ListView/ListView.tsx:
##########
@@ -516,6 +582,32 @@ export function ListView<T extends object = any>({
           )}
         </div>
       </div>
+
+      {/* Mobile filter drawer */}
+      {filterable && setMobileFiltersOpen && (
+        <Drawer
+          title={mobileFiltersDrawerTitle || t('Search')}
+          placement="left"
+          onClose={() => setMobileFiltersOpen(false)}
+          open={mobileFiltersOpen}
+          width={300}
+        >
+          <MobileFilterDrawerContent>
+            <FilterControls
+              filters={filters}
+              internalFilters={internalFilters}
+              updateFilterValue={applyFilterValue}
+            />

Review Comment:
   <!-- Bito Reply -->
   Using a callback prop (e.g., onClear) instead of a ref keeps the 
FilterControls component more declarative and avoids imperative ref usage. A 
context provider could also work for shared clear logic across components, 
reducing prop passing.
   
   **superset-frontend/src/components/ListView/ListView.tsx**
   ```
   <FilterControls
                  onClear={clearFilters}
                  filters={filters}
                  internalFilters={internalFilters}
                  updateFilterValue={applyFilterValue}
                />
   ```
   
   **superset-frontend/src/components/ListView/ListView.tsx**
   ```
   <FilterContext.Provider value={{ clearFilters }}>
                  <FilterControls
                    filters={filters}
                    internalFilters={internalFilters}
                    updateFilterValue={applyFilterValue}
                  />
                </FilterContext.Provider>
   ```



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