Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix initial bubble marker bug #604

Merged
merged 3 commits into from
Nov 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -595,11 +595,6 @@ function useMarkerData(props: DataProps) {

const { numeratorValues, denominatorValues } = configuration;

const disabled =
numeratorValues?.length === 0 ||
denominatorValues?.length === 0 ||
!validateProportionValues(numeratorValues, denominatorValues);

const studyEntities = useStudyEntities();
const dataClient = useDataClient();

Expand Down Expand Up @@ -639,6 +634,13 @@ function useMarkerData(props: DataProps) {
};
const { data: legendData } = useLegendData(props);

// add to check legendData is undefined for refetch
const disabled =
numeratorValues?.length === 0 ||
denominatorValues?.length === 0 ||
!validateProportionValues(numeratorValues, denominatorValues) ||
legendData == null;

// FIXME Don't make dependent on legend data
return useQuery({
queryKey: ['bubbleMarkers', 'markerData', markerRequestParams],
Expand Down
Loading