Skip to content

Commit

Permalink
[CLDN-1829] fixing principle filter logic with state (#234) (#244)
Browse files Browse the repository at this point in the history
* [CLDN-1829] fixing principle filter logic with state

* [CLDN-1829] Fixing build error
  • Loading branch information
cccs-RyanS authored and cccs-RyanK committed Apr 20, 2023
1 parent 9eb91d4 commit f41c18d
Showing 1 changed file with 5 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,6 @@ const validateAggControlValues = (
: [];
};

const validateAggColumnValues = (
controls: ControlStateMapping,
values: any[],
state: ControlPanelState,
) => {
const result = validateAggControlValues(controls, values);
if (result.length === 0 && isAggMode({ controls })) {
return [];
}
return result;
};

// function isIP(v: unknown) {
// if (typeof v === 'string' && v.trim().length > 0) {
// //console.log(v.trim());
Expand Down Expand Up @@ -239,13 +227,8 @@ const config: ControlPanelConfig = {

return newState;
},
rerender: [
'metrics',
'percent_metrics',
'principalEmitFilterColumn',
],
canCopy: true,
} as typeof sharedControls.groupby,
rerender: ['metrics', 'percent_metrics'],
},
},
],
[
Expand Down Expand Up @@ -437,8 +420,9 @@ const config: ControlPanelConfig = {
controlState: ControlState,
) => {
const { controls } = state;
const originalMapStateToProps =
sharedControls?.columns?.mapStateToProps;
const originalMapStateToProps = isRawMode({ controls })
? sharedControls?.columns?.mapStateToProps
: sharedControls?.groupby?.mapStateToProps;
const newState =
originalMapStateToProps?.(state, controlState) ?? {};
const choices = isRawMode({ controls })
Expand Down

0 comments on commit f41c18d

Please sign in to comment.