villebro commented on a change in pull request #13137:
URL: https://github.com/apache/superset/pull/13137#discussion_r584572488
##########
File path:
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBar.tsx
##########
@@ -183,14 +177,10 @@ const FilterBar: React.FC<FiltersBarProps> = ({
directPathToChild,
}) => {
const [filterData, setFilterData] = useState<{
- [id: string]: {
- extraFormData: ExtraFormData;
- currentState: CurrentFilterState;
- };
+ [filterId: string]: Omit<FilterState, 'id'>;
Review comment:
..this would also be cleaner with `id` being optional.
##########
File path: superset-frontend/src/dashboard/actions/nativeFilters.ts
##########
@@ -142,51 +138,49 @@ export const setFilterSetsConfiguration = (
}
};
-export const SET_EXTRA_FORM_DATA = 'SET_EXTRA_FORM_DATA';
-export interface SetExtraFormData {
- type: typeof SET_EXTRA_FORM_DATA;
+export const UPDATE_EXTRA_FORM_DATA = 'UPDATE_EXTRA_FORM_DATA';
+export interface UpdateExtraFormData {
+ type: typeof UPDATE_EXTRA_FORM_DATA;
filterId: string;
- extraFormData: ExtraFormData;
- currentState: CurrentFilterState;
+ nativeFilters?: Omit<FilterState, 'id'>;
+ crossFilters?: Omit<FilterState, 'id'>;
+ ownFilters?: Omit<FilterState, 'id'>;
Review comment:
Would it make more sense to make `id` optional on `FilterState`?
----------------------------------------------------------------
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]