Skip to content

Commit

Permalink
[CLDN-1565] Fixing bugs (#189)
Browse files Browse the repository at this point in the history
* [CLDN-1565] Fixing bugs

* removing uneeded import
  • Loading branch information
cccs-RyanS authored and cccs-RyanK committed Apr 19, 2023
1 parent 71c917c commit 06ee1bb
Showing 1 changed file with 17 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import React from 'react'
import React from 'react';

import {
t,
Expand Down Expand Up @@ -48,7 +48,6 @@ import { StyledColumnOption } from 'src/explore/components/optionRenderers';

import DrillActionConfig from '../components/controls/JumpActionConfigControll';


export const PAGE_SIZE_OPTIONS = formatSelectOptions<number>([
[0, t('page_size.all')],
10,
Expand Down Expand Up @@ -104,6 +103,17 @@ 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) {
Expand Down Expand Up @@ -229,7 +239,7 @@ const config: ControlPanelConfig = {

return newState;
},
rerender: ['metrics', 'percent_metrics', ],
rerender: ['metrics', 'percent_metrics'],
},
},
],
Expand Down Expand Up @@ -332,7 +342,7 @@ const config: ControlPanelConfig = {
rerender: ['principalColumns'],
visibility: isRawMode,
canCopy: true,
}
},
},
],
[
Expand Down Expand Up @@ -422,9 +432,9 @@ const config: ControlPanelConfig = {
controlState: ControlState,
) => {
const { controls } = state;
const originalMapStateToProps = isRawMode({ controls }) ?
sharedControls?.columns?.mapStateToProps :
sharedControls?.groupby?.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 06ee1bb

Please sign in to comment.