Skip to content

Commit

Permalink
Addresses comments
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-s-molina committed Jan 19, 2024
1 parent 1a95d38 commit 327d9e1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,22 @@ import {
ControlSetItem,
ControlSetRow,
} from '@superset-ui/chart-controls';
import { FeatureFlag, isFeatureEnabled, t } from '@superset-ui/core';
import { t } from '@superset-ui/core';
import { PAGE_SIZE_OPTIONS } from '../../consts';

export const serverPaginationControlSetRow: ControlSetRow = isFeatureEnabled(
FeatureFlag.DASHBOARD_CROSS_FILTERS,
)
? [
{
name: 'server_pagination',
config: {
type: 'CheckboxControl',
label: t('Server pagination'),
description: t(
'Enable server side pagination of results (experimental feature)',
),
default: false,
},
},
]
: [];
export const serverPaginationControlSetRow: ControlSetRow = [
{
name: 'server_pagination',
config: {
type: 'CheckboxControl',
label: t('Server pagination'),
description: t(
'Enable server side pagination of results (experimental feature)',
),
default: false,
},
},
];

export const serverPageLengthControlSetItem: ControlSetItem = {
name: 'server_page_length',
Expand Down
14 changes: 2 additions & 12 deletions superset-frontend/src/dataMask/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import {
DataMask,
isFeatureEnabled,
FeatureFlag,
FilterConfiguration,
Filters,
} from '@superset-ui/core';
import { DataMask, FilterConfiguration, Filters } from '@superset-ui/core';
import { getInitialDataMask } from './reducer';

export const CLEAR_DATA_MASK_STATE = 'CLEAR_DATA_MASK_STATE';
Expand Down Expand Up @@ -73,14 +67,10 @@ export function updateDataMask(
filterId: string | number,
dataMask: DataMask,
): UpdateDataMask {
// Only apply data mask if one of the relevant features is enabled
const isFeatureFlagActive = isFeatureEnabled(
FeatureFlag.DASHBOARD_CROSS_FILTERS,
);
return {
type: UPDATE_DATA_MASK,
filterId,
dataMask: isFeatureFlagActive ? dataMask : {},
dataMask,
};
}

Expand Down

0 comments on commit 327d9e1

Please sign in to comment.