Skip to content

Commit

Permalink
remove date as allowed varaible
Browse files Browse the repository at this point in the history
  • Loading branch information
bobular committed Sep 12, 2023
1 parent 44c61b0 commit c065810
Showing 1 changed file with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
aggregationHelp,
AggregationInputs,
} from '../../../core/components/visualizations/implementations/LineplotVisualization';
import { DataElementConstraint } from '../../../core/types/visualization';

type AggregatorOption = typeof aggregatorOptions[number];
const aggregatorOptions = ['mean', 'median'] as const;
Expand Down Expand Up @@ -189,7 +190,22 @@ export function BubbleMarkerConfigurationMenu({
onChange={handleInputVariablesOnChange}
starredVariables={starredVariables}
toggleStarredVariable={toggleStarredVariable}
constraints={constraints}
constraints={
// TEMPORARILY disable date vars; TO DO for dates - remove!
constraints?.map((constraint) => {
return Object.fromEntries(
Object.keys(constraint).map((key) => [
key,
{
...constraint[key],
allowedTypes: constraint[key]?.allowedTypes
? constraint[key]?.allowedTypes?.filter((t) => t !== 'date')
: ['string', 'number', 'integer'],
} as DataElementConstraint, // assertion seems required due to spread operator
])
);
})
}
flexDirection="column"
/>
</div>
Expand Down

0 comments on commit c065810

Please sign in to comment.