nytai commented on a change in pull request #11675:
URL:
https://github.com/apache/incubator-superset/pull/11675#discussion_r525893192
##########
File path: superset-frontend/src/components/ListView/ListView.tsx
##########
@@ -292,9 +295,14 @@ function ListView<T extends object = any>({
const cardViewEnabled = Boolean(renderCard);
const [viewingMode, setViewingMode] = useState<ViewModeType>(
- cardViewEnabled ? defaultViewMode : 'table',
+ cardViewEnabled ? viewMode || defaultViewMode : 'table',
Review comment:
It looks like this is just duplicating the viewMode state that's now in
the useListViewState hook. Can we remove this and just rely on `viewMode` and
`setViewMode` instead?
##########
File path: superset-frontend/src/components/ListView/utils.ts
##########
@@ -63,11 +68,11 @@ function updateInList(list: any[], index: number, update:
any): any[] {
];
}
-function mergeCreateFilterValues(list: Filter[], updateList: FilterValue[]) {
+function mergeCreateFilterValues(list: Filter[], updateObj: any) {
Review comment:
can we type the query filters object? something like
```
type QueryFilterState = {
[id: string]: [value: FilterValue["value"], operator: FilterValue["value"]]
}
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]