diff --git a/RESOURCES/INTHEWILD.yaml b/RESOURCES/INTHEWILD.yaml
index f68a9029efc2..2336380e5570 100644
--- a/RESOURCES/INTHEWILD.yaml
+++ b/RESOURCES/INTHEWILD.yaml
@@ -287,8 +287,10 @@ categories:
url: https://www.gfk.com/home
contributors: ["@mherr"]
+ # Logo approved by @anmol-hpe on behalf of HPE
- name: HPE
url: https://www.hpe.com/in/en/home.html
+ logo: hpe.png
contributors: ["@anmol-hpe"]
- name: Hydrolix
diff --git a/docs/docs/quickstart.mdx b/docs/docs/quickstart.mdx
index b92c038fb228..eb234ca795e4 100644
--- a/docs/docs/quickstart.mdx
+++ b/docs/docs/quickstart.mdx
@@ -32,7 +32,7 @@ git clone https://github.com/apache/superset
$ cd superset
# Set the repo to the state associated with the latest official version
-$ git checkout tags/5.0.0
+$ git checkout tags/6.0.0
# Fire up Superset using Docker Compose
$ docker compose -f docker-compose-image-tag.yml up
diff --git a/docs/package.json b/docs/package.json
index ee68295c2111..0bda2e216267 100644
--- a/docs/package.json
+++ b/docs/package.json
@@ -89,7 +89,7 @@
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-prettier": "^5.5.5",
"eslint-plugin-react": "^7.37.5",
- "globals": "^17.1.0",
+ "globals": "^17.2.0",
"prettier": "^3.8.1",
"typescript": "~5.9.3",
"typescript-eslint": "^8.54.0",
diff --git a/docs/static/img/logos/hpe.png b/docs/static/img/logos/hpe.png
new file mode 100644
index 000000000000..221137dd974a
Binary files /dev/null and b/docs/static/img/logos/hpe.png differ
diff --git a/docs/versioned_docs/version-6.0.0/quickstart.mdx b/docs/versioned_docs/version-6.0.0/quickstart.mdx
index 4e23b422e996..bbd4e5d0d44d 100644
--- a/docs/versioned_docs/version-6.0.0/quickstart.mdx
+++ b/docs/versioned_docs/version-6.0.0/quickstart.mdx
@@ -32,7 +32,7 @@ git clone https://github.com/apache/superset
$ cd superset
# Set the repo to the state associated with the latest official version
-$ git checkout tags/5.0.0
+$ git checkout tags/6.0.0
# Fire up Superset using Docker Compose
$ docker compose -f docker-compose-image-tag.yml up
diff --git a/docs/yarn.lock b/docs/yarn.lock
index 878567d54fcc..d60267035511 100644
--- a/docs/yarn.lock
+++ b/docs/yarn.lock
@@ -7696,10 +7696,10 @@ globals@^15.14.0:
resolved "https://registry.yarnpkg.com/globals/-/globals-15.15.0.tgz#7c4761299d41c32b075715a4ce1ede7897ff72a8"
integrity sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==
-globals@^17.1.0:
- version "17.1.0"
- resolved "https://registry.yarnpkg.com/globals/-/globals-17.1.0.tgz#03448e667caa3914312a7937eef48c4a59dc6859"
- integrity sha512-8HoIcWI5fCvG5NADj4bDav+er9B9JMj2vyL2pI8D0eismKyUvPLTSs+Ln3wqhwcp306i73iyVnEKx3F6T47TGw==
+globals@^17.2.0:
+ version "17.2.0"
+ resolved "https://registry.yarnpkg.com/globals/-/globals-17.2.0.tgz#41d29408d6f5408457d2ef965d29215e3026779f"
+ integrity sha512-tovnCz/fEq+Ripoq+p/gN1u7l6A7wwkoBT9pRCzTHzsD/LvADIzXZdjmRymh5Ztf0DYC3Rwg5cZRYjxzBmzbWg==
globalthis@^1.0.4:
version "1.0.4"
diff --git a/superset-frontend/package-lock.json b/superset-frontend/package-lock.json
index cab35a7ff04d..3adffad48caa 100644
--- a/superset-frontend/package-lock.json
+++ b/superset-frontend/package-lock.json
@@ -255,7 +255,7 @@
"lightningcss": "^1.31.1",
"mini-css-extract-plugin": "^2.10.0",
"open-cli": "^8.0.0",
- "oxlint": "^1.41.0",
+ "oxlint": "^1.42.0",
"po2json": "^0.4.5",
"prettier": "3.8.1",
"prettier-plugin-packagejson": "^3.0.0",
@@ -10293,9 +10293,9 @@
}
},
"node_modules/@oxlint/darwin-arm64": {
- "version": "1.41.0",
- "resolved": "https://registry.npmjs.org/@oxlint/darwin-arm64/-/darwin-arm64-1.41.0.tgz",
- "integrity": "sha512-K0Bs0cNW11oWdSrKmrollKF44HMM2HKr4QidZQHMlhJcSX8pozxv0V5FLdqB4sddzCY0J9Wuuw+oRAfR8sdRwA==",
+ "version": "1.42.0",
+ "resolved": "https://registry.npmjs.org/@oxlint/darwin-arm64/-/darwin-arm64-1.42.0.tgz",
+ "integrity": "sha512-ui5CdAcDsXPQwZQEXOOSWsilJWhgj9jqHCvYBm2tDE8zfwZZuF9q58+hGKH1x5y0SV4sRlyobB2Quq6uU6EgeA==",
"cpu": [
"arm64"
],
@@ -10307,9 +10307,9 @@
]
},
"node_modules/@oxlint/darwin-x64": {
- "version": "1.41.0",
- "resolved": "https://registry.npmjs.org/@oxlint/darwin-x64/-/darwin-x64-1.41.0.tgz",
- "integrity": "sha512-1LCCXCe9nN8LbrJ1QOGari2HqnxrZrveYKysWDIg8gFsQglIg00XF/8lRbA0kWHMdLgt4X0wfNYhhFz+c3XXLQ==",
+ "version": "1.42.0",
+ "resolved": "https://registry.npmjs.org/@oxlint/darwin-x64/-/darwin-x64-1.42.0.tgz",
+ "integrity": "sha512-wo0M/hcpHRv7vFje99zHHqheOhVEwUOKjOgBKyi0M99xcLizv04kcSm1rTd6HSCeZgOtiJYZRVAlKhQOQw2byQ==",
"cpu": [
"x64"
],
@@ -10321,9 +10321,9 @@
]
},
"node_modules/@oxlint/linux-arm64-gnu": {
- "version": "1.41.0",
- "resolved": "https://registry.npmjs.org/@oxlint/linux-arm64-gnu/-/linux-arm64-gnu-1.41.0.tgz",
- "integrity": "sha512-Fow7H84Bs8XxuaK1yfSEWBC8HI7rfEQB9eR2A0J61un1WgCas7jNrt1HbT6+p6KmUH2bhR+r/RDu/6JFAvvj4g==",
+ "version": "1.42.0",
+ "resolved": "https://registry.npmjs.org/@oxlint/linux-arm64-gnu/-/linux-arm64-gnu-1.42.0.tgz",
+ "integrity": "sha512-j4QzfCM8ks+OyM+KKYWDiBEQsm5RCW50H1Wz16wUyoFsobJ+X5qqcJxq6HvkE07m8euYmZelyB0WqsiDoz1v8g==",
"cpu": [
"arm64"
],
@@ -10335,9 +10335,9 @@
]
},
"node_modules/@oxlint/linux-arm64-musl": {
- "version": "1.41.0",
- "resolved": "https://registry.npmjs.org/@oxlint/linux-arm64-musl/-/linux-arm64-musl-1.41.0.tgz",
- "integrity": "sha512-WoRRDNwgP5W3rjRh42Zdx8ferYnqpKoYCv2QQLenmdrLjRGYwAd52uywfkcS45mKEWHeY1RPwPkYCSROXiGb2w==",
+ "version": "1.42.0",
+ "resolved": "https://registry.npmjs.org/@oxlint/linux-arm64-musl/-/linux-arm64-musl-1.42.0.tgz",
+ "integrity": "sha512-g5b1Uw7zo6yw4Ymzyd1etKzAY7xAaGA3scwB8tAp3QzuY7CYdfTwlhiLKSAKbd7T/JBgxOXAGNcLDorJyVTXcg==",
"cpu": [
"arm64"
],
@@ -10349,9 +10349,9 @@
]
},
"node_modules/@oxlint/linux-x64-gnu": {
- "version": "1.41.0",
- "resolved": "https://registry.npmjs.org/@oxlint/linux-x64-gnu/-/linux-x64-gnu-1.41.0.tgz",
- "integrity": "sha512-75k3CKj3fOc/a/2aSgO81s3HsTZOFROthPJ+UI2Oatic1LhvH6eKjKfx3jDDyVpzeDS2qekPlc/y3N33iZz5Og==",
+ "version": "1.42.0",
+ "resolved": "https://registry.npmjs.org/@oxlint/linux-x64-gnu/-/linux-x64-gnu-1.42.0.tgz",
+ "integrity": "sha512-HnD99GD9qAbpV4q9iQil7mXZUJFpoBdDavfcC2CgGLPlawfcV5COzQPNwOgvPVkr7C0cBx6uNCq3S6r9IIiEIg==",
"cpu": [
"x64"
],
@@ -10363,9 +10363,9 @@
]
},
"node_modules/@oxlint/linux-x64-musl": {
- "version": "1.41.0",
- "resolved": "https://registry.npmjs.org/@oxlint/linux-x64-musl/-/linux-x64-musl-1.41.0.tgz",
- "integrity": "sha512-8r82eBwGPoAPn67ZvdxTlX/Z3gVb+ZtN6nbkyFzwwHWAh8yGutX+VBcVkyrePSl6XgBP4QAaddPnHmkvJjqY0g==",
+ "version": "1.42.0",
+ "resolved": "https://registry.npmjs.org/@oxlint/linux-x64-musl/-/linux-x64-musl-1.42.0.tgz",
+ "integrity": "sha512-8NTe8A78HHFn+nBi+8qMwIjgv9oIBh+9zqCPNLH56ah4vKOPvbePLI6NIv9qSkmzrBuu8SB+FJ2TH/G05UzbNA==",
"cpu": [
"x64"
],
@@ -10377,9 +10377,9 @@
]
},
"node_modules/@oxlint/win32-arm64": {
- "version": "1.41.0",
- "resolved": "https://registry.npmjs.org/@oxlint/win32-arm64/-/win32-arm64-1.41.0.tgz",
- "integrity": "sha512-aK+DAcckQsNCOXKruatyYuY/ROjNiRejQB1PeJtkZwM21+8rV9ODYbvKNvt0pW+YCws7svftBSFMCpl3ke2unw==",
+ "version": "1.42.0",
+ "resolved": "https://registry.npmjs.org/@oxlint/win32-arm64/-/win32-arm64-1.42.0.tgz",
+ "integrity": "sha512-lAPS2YAuu+qFqoTNPFcNsxXjwSV0M+dOgAzzVTAN7Yo2ifj+oLOx0GsntWoM78PvQWI7Q827ZxqtU2ImBmDapA==",
"cpu": [
"arm64"
],
@@ -10391,9 +10391,9 @@
]
},
"node_modules/@oxlint/win32-x64": {
- "version": "1.41.0",
- "resolved": "https://registry.npmjs.org/@oxlint/win32-x64/-/win32-x64-1.41.0.tgz",
- "integrity": "sha512-dVBXkZ6MGLd3owV7jvuqJsZwiF3qw7kEkDVsYVpS/O96eEvlHcxVbaPjJjrTBgikXqyC22vg3dxBU7MW0utGfw==",
+ "version": "1.42.0",
+ "resolved": "https://registry.npmjs.org/@oxlint/win32-x64/-/win32-x64-1.42.0.tgz",
+ "integrity": "sha512-3/KmyUOHNriL6rLpaFfm9RJxdhpXY2/Ehx9UuorJr2pUA+lrZL15FAEx/DOszYm5r10hfzj40+efAHcCilNvSQ==",
"cpu": [
"x64"
],
@@ -46255,9 +46255,9 @@
}
},
"node_modules/oxlint": {
- "version": "1.41.0",
- "resolved": "https://registry.npmjs.org/oxlint/-/oxlint-1.41.0.tgz",
- "integrity": "sha512-Dyaoup82uhgAgp5xLNt4dPdvl5eSJTIzqzL7DcKbkooUE4PDViWURIPlSUF8hu5a+sCnNIp/LlQMDsKoyaLTBA==",
+ "version": "1.42.0",
+ "resolved": "https://registry.npmjs.org/oxlint/-/oxlint-1.42.0.tgz",
+ "integrity": "sha512-qnspC/lrp8FgKNaONLLn14dm+W5t0SSlus6V5NJpgI2YNT1tkFYZt4fBf14ESxf9AAh98WBASnW5f0gtw462Lg==",
"dev": true,
"license": "MIT",
"bin": {
@@ -46270,17 +46270,17 @@
"url": "https://github.com/sponsors/Boshen"
},
"optionalDependencies": {
- "@oxlint/darwin-arm64": "1.41.0",
- "@oxlint/darwin-x64": "1.41.0",
- "@oxlint/linux-arm64-gnu": "1.41.0",
- "@oxlint/linux-arm64-musl": "1.41.0",
- "@oxlint/linux-x64-gnu": "1.41.0",
- "@oxlint/linux-x64-musl": "1.41.0",
- "@oxlint/win32-arm64": "1.41.0",
- "@oxlint/win32-x64": "1.41.0"
+ "@oxlint/darwin-arm64": "1.42.0",
+ "@oxlint/darwin-x64": "1.42.0",
+ "@oxlint/linux-arm64-gnu": "1.42.0",
+ "@oxlint/linux-arm64-musl": "1.42.0",
+ "@oxlint/linux-x64-gnu": "1.42.0",
+ "@oxlint/linux-x64-musl": "1.42.0",
+ "@oxlint/win32-arm64": "1.42.0",
+ "@oxlint/win32-x64": "1.42.0"
},
"peerDependencies": {
- "oxlint-tsgolint": ">=0.11.1"
+ "oxlint-tsgolint": ">=0.11.2"
},
"peerDependenciesMeta": {
"oxlint-tsgolint": {
diff --git a/superset-frontend/package.json b/superset-frontend/package.json
index 30ef0d1d6697..8d9518381ccc 100644
--- a/superset-frontend/package.json
+++ b/superset-frontend/package.json
@@ -336,7 +336,7 @@
"lightningcss": "^1.31.1",
"mini-css-extract-plugin": "^2.10.0",
"open-cli": "^8.0.0",
- "oxlint": "^1.41.0",
+ "oxlint": "^1.42.0",
"po2json": "^0.4.5",
"prettier": "3.8.1",
"prettier-plugin-packagejson": "^3.0.0",
diff --git a/superset-frontend/packages/superset-ui-core/src/components/Select/Select.test.tsx b/superset-frontend/packages/superset-ui-core/src/components/Select/Select.test.tsx
index e13c98c5473f..e0383d825584 100644
--- a/superset-frontend/packages/superset-ui-core/src/components/Select/Select.test.tsx
+++ b/superset-frontend/packages/superset-ui-core/src/components/Select/Select.test.tsx
@@ -86,7 +86,7 @@ const getSelect = () =>
screen.getByRole('combobox', { name: new RegExp(ARIA_LABEL, 'i') });
const selectAllButtonText = (length: number) => `Select all (${length})`;
-const deselectAllButtonText = (length: number) => `Deselect all (${length})`;
+const deselectAllButtonText = (length: number) => `Clear (${length})`;
const findSelectOption = (text: string) =>
waitFor(() =>
diff --git a/superset-frontend/packages/superset-ui-core/src/components/Select/Select.tsx b/superset-frontend/packages/superset-ui-core/src/components/Select/Select.tsx
index 0c6a32a7047f..222ba643bcd6 100644
--- a/superset-frontend/packages/superset-ui-core/src/components/Select/Select.tsx
+++ b/superset-frontend/packages/superset-ui-core/src/components/Select/Select.tsx
@@ -64,6 +64,7 @@ import {
} from './styles';
import {
DEFAULT_SORT_COMPARATOR,
+ DROPDOWN_ALIGN_BOTTOM,
EMPTY_OPTIONS,
MAX_TAG_COUNT,
TOKEN_SEPARATORS,
@@ -522,7 +523,7 @@ const Select = forwardRef(
handleDeselectAll();
}}
>
- {`${t('Deselect all')} (${bulkSelectCounts.deselectable})`}
+ {`${t('Clear')} (${bulkSelectCounts.deselectable})`}
),
@@ -776,7 +777,9 @@ const Select = forwardRef(
options={visibleOptions}
optionRender={option => {option.label || option.value}}
oneLine={oneLine}
+ popupMatchSelectWidth={selectAllEnabled ? 168 : true}
css={props.css}
+ dropdownAlign={DROPDOWN_ALIGN_BOTTOM}
{...props}
showSearch={shouldShowSearch}
ref={ref}
diff --git a/superset-frontend/packages/superset-ui-core/src/components/Select/constants.ts b/superset-frontend/packages/superset-ui-core/src/components/Select/constants.ts
index 950ae40ec728..4132870b68b0 100644
--- a/superset-frontend/packages/superset-ui-core/src/components/Select/constants.ts
+++ b/superset-frontend/packages/superset-ui-core/src/components/Select/constants.ts
@@ -19,7 +19,7 @@
import { LabeledValue as AntdLabeledValue } from 'antd/es/select';
import { t } from '@apache-superset/core';
import { rankedSearchCompare } from '../../utils/rankedSearchCompare';
-import { RawValue } from './types';
+import { RawValue, SelectProps } from './types';
export const MAX_TAG_COUNT = 4;
@@ -33,6 +33,12 @@ export const SELECT_ALL_VALUE: RawValue = t('Select All');
export const VIRTUAL_THRESHOLD = 20;
+export const DROPDOWN_ALIGN_BOTTOM: SelectProps['dropdownAlign'] = {
+ points: ['tl', 'bl'],
+ offset: [0, 4],
+ overflow: { adjustX: 0, adjustY: 1 },
+};
+
export const SELECT_ALL_OPTION = {
value: SELECT_ALL_VALUE,
label: String(SELECT_ALL_VALUE),
diff --git a/superset-frontend/packages/superset-ui-core/src/components/Select/styles.tsx b/superset-frontend/packages/superset-ui-core/src/components/Select/styles.tsx
index 8eaa5d1eeffb..eedbd1fd3b61 100644
--- a/superset-frontend/packages/superset-ui-core/src/components/Select/styles.tsx
+++ b/superset-frontend/packages/superset-ui-core/src/components/Select/styles.tsx
@@ -142,5 +142,6 @@ export const StyledBulkActionsContainer = styled(Flex)`
${({ theme }) => `
padding: ${theme.sizeUnit}px;
border-top: 1px solid ${theme.colorSplit};
+ gap: ${theme.sizeUnit * 2}px;
`}
`;
diff --git a/superset-frontend/packages/superset-ui-core/src/components/Select/types.ts b/superset-frontend/packages/superset-ui-core/src/components/Select/types.ts
index 2f52035b434e..7d38dba9d814 100644
--- a/superset-frontend/packages/superset-ui-core/src/components/Select/types.ts
+++ b/superset-frontend/packages/superset-ui-core/src/components/Select/types.ts
@@ -71,6 +71,7 @@ export type AntdExposedProps = Pick<
| 'virtual'
| 'getPopupContainer'
| 'menuItemSelectedIcon'
+ | 'dropdownAlign'
>;
export type SelectOptionsType = Exclude;
diff --git a/superset-frontend/src/dataMask/reducer.test.ts b/superset-frontend/src/dataMask/reducer.test.ts
new file mode 100644
index 000000000000..00f5e88d4469
--- /dev/null
+++ b/superset-frontend/src/dataMask/reducer.test.ts
@@ -0,0 +1,118 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import reducer, { getInitialDataMask } from './reducer';
+import {
+ SET_DATA_MASK_FOR_FILTER_CHANGES_COMPLETE,
+ type SetDataMaskForFilterChangesComplete,
+} from './actions';
+import {
+ type DataMaskStateWithId,
+ type Filter,
+ type NativeFilterTarget,
+ NativeFilterType,
+} from '@superset-ui/core';
+
+// Helper to create minimal filter for testing
+const createFilter = (
+ id: string,
+ columnName = 'col',
+ controlValues = {},
+): Filter =>
+ ({
+ id,
+ name: id,
+ type: NativeFilterType.NativeFilter,
+ scope: { rootPath: [], excluded: [] },
+ chartsInScope: [],
+ tabsInScope: [],
+ controlValues,
+ filterType: 'filter_select',
+ targets: [{ column: { name: columnName } } as NativeFilterTarget],
+ defaultDataMask: { filterState: { value: undefined } },
+ cascadeParentIds: [],
+ description: '',
+ }) satisfies Partial as Filter;
+
+// Helper to create action for filter modification
+const createModifyAction = (
+ modifiedFilter: Filter,
+ oldFilters = {},
+): SetDataMaskForFilterChangesComplete => ({
+ type: SET_DATA_MASK_FOR_FILTER_CHANGES_COMPLETE,
+ filterChanges: {
+ deleted: [],
+ reordered: [],
+ modified: [modifiedFilter],
+ },
+ filters: oldFilters,
+});
+
+test('when user edits a filter and changes targets, other filters maintain their selected values', () => {
+ const initialState: DataMaskStateWithId = {
+ 'NATIVE_FILTER-1': {
+ id: 'NATIVE_FILTER-1',
+ ...getInitialDataMask('NATIVE_FILTER-1'),
+ filterState: { value: ['foo'] },
+ },
+ 'NATIVE_FILTER-2': {
+ id: 'NATIVE_FILTER-2',
+ ...getInitialDataMask('NATIVE_FILTER-2'),
+ filterState: { value: ['bar'] },
+ },
+ };
+
+ const action = createModifyAction(
+ createFilter('NATIVE_FILTER-1', 'col_changed'),
+ );
+
+ const result = reducer(initialState, action);
+
+ expect(result['NATIVE_FILTER-2']?.filterState?.value).toEqual(['bar']);
+ expect(result['NATIVE_FILTER-1']?.filterState?.value).toBeUndefined();
+});
+
+test('when user edits a filter without changing targets, their selection is preserved', () => {
+ const initialState: DataMaskStateWithId = {
+ 'NATIVE_FILTER-1': {
+ id: 'NATIVE_FILTER-1',
+ ...getInitialDataMask('NATIVE_FILTER-1'),
+ extraFormData: { time_range: '1 year ago' },
+ filterState: { value: ['foo'] },
+ },
+ };
+
+ const oldFilters = {
+ 'NATIVE_FILTER-1': createFilter('NATIVE_FILTER-1', 'col_a', {
+ enableEmptyFilter: true,
+ }),
+ };
+
+ const action = createModifyAction(
+ createFilter('NATIVE_FILTER-1', 'col_a', { enableEmptyFilter: true }),
+ oldFilters,
+ );
+
+ const result = reducer(initialState, action);
+
+ expect(result['NATIVE_FILTER-1']?.filterState?.value).toEqual(['foo']);
+ expect(result['NATIVE_FILTER-1']?.extraFormData?.time_range).toEqual(
+ '1 year ago',
+ );
+});
diff --git a/superset-frontend/src/dataMask/reducer.ts b/superset-frontend/src/dataMask/reducer.ts
index 6f467a635ad0..b049c0efde2b 100644
--- a/superset-frontend/src/dataMask/reducer.ts
+++ b/superset-frontend/src/dataMask/reducer.ts
@@ -136,21 +136,16 @@ function updateDataMaskForFilterChanges(
initialDataMask?: Filters,
isCustomizationChanges?: boolean,
) {
- const dataMask = initialDataMask || {};
-
- Object.entries(dataMask).forEach(([key, value]) => {
- mergedDataMask[key] = { ...value, ...value.defaultDataMask };
- });
-
filterChanges.deleted.forEach((filterId: string) => {
delete mergedDataMask[filterId];
});
filterChanges.modified.forEach((filter: Filter) => {
const existingFilter = draftDataMask[filter.id] as FilterWithExtaFromData;
+ const prevFilterDef = initialDataMask?.[filter.id] as Filter | undefined;
// Check if targets are equal
- const areTargetsEqual = isEqual(existingFilter?.targets, filter?.targets);
+ const areTargetsEqual = isEqual(prevFilterDef?.targets, filter?.targets);
// Preserve state only if filter exists, has enableEmptyFilter=true and targets match
const shouldPreserveState =
@@ -171,6 +166,17 @@ function updateDataMaskForFilterChanges(
};
});
+ // Preserve state for native filters that were not modified or deleted
+ Object.entries(draftDataMask).forEach(([key, value]) => {
+ if (String(value?.id).startsWith(NATIVE_FILTER_PREFIX)) {
+ const wasDeleted = filterChanges.deleted.includes(key);
+ const wasModified = filterChanges.modified.some(f => f.id === key);
+ if (!wasDeleted && !wasModified) {
+ mergedDataMask[key] = value;
+ }
+ }
+ });
+
Object.values(draftDataMask).forEach(filter => {
const filterId = String(filter?.id);
const shouldSkip = isCustomizationChanges
diff --git a/superset-websocket/package-lock.json b/superset-websocket/package-lock.json
index 723aa0c4ee80..bd87ec704a7b 100644
--- a/superset-websocket/package-lock.json
+++ b/superset-websocket/package-lock.json
@@ -33,7 +33,7 @@
"eslint": "^9.39.2",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-lodash": "^8.0.0",
- "globals": "^17.1.0",
+ "globals": "^17.2.0",
"jest": "^29.7.0",
"prettier": "^3.8.1",
"ts-jest": "^29.4.6",
@@ -3377,9 +3377,9 @@
}
},
"node_modules/globals": {
- "version": "17.1.0",
- "resolved": "https://registry.npmjs.org/globals/-/globals-17.1.0.tgz",
- "integrity": "sha512-8HoIcWI5fCvG5NADj4bDav+er9B9JMj2vyL2pI8D0eismKyUvPLTSs+Ln3wqhwcp306i73iyVnEKx3F6T47TGw==",
+ "version": "17.2.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-17.2.0.tgz",
+ "integrity": "sha512-tovnCz/fEq+Ripoq+p/gN1u7l6A7wwkoBT9pRCzTHzsD/LvADIzXZdjmRymh5Ztf0DYC3Rwg5cZRYjxzBmzbWg==",
"dev": true,
"license": "MIT",
"engines": {
@@ -9019,9 +9019,9 @@
}
},
"globals": {
- "version": "17.1.0",
- "resolved": "https://registry.npmjs.org/globals/-/globals-17.1.0.tgz",
- "integrity": "sha512-8HoIcWI5fCvG5NADj4bDav+er9B9JMj2vyL2pI8D0eismKyUvPLTSs+Ln3wqhwcp306i73iyVnEKx3F6T47TGw==",
+ "version": "17.2.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-17.2.0.tgz",
+ "integrity": "sha512-tovnCz/fEq+Ripoq+p/gN1u7l6A7wwkoBT9pRCzTHzsD/LvADIzXZdjmRymh5Ztf0DYC3Rwg5cZRYjxzBmzbWg==",
"dev": true
},
"graceful-fs": {
diff --git a/superset-websocket/package.json b/superset-websocket/package.json
index f3c353968130..d079b68b4cbe 100644
--- a/superset-websocket/package.json
+++ b/superset-websocket/package.json
@@ -41,7 +41,7 @@
"eslint": "^9.39.2",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-lodash": "^8.0.0",
- "globals": "^17.1.0",
+ "globals": "^17.2.0",
"jest": "^29.7.0",
"prettier": "^3.8.1",
"ts-jest": "^29.4.6",