fix(URL): allow multi filter query (#3314)
This commit is contained in:
1 parent
25b4f8ed97
commit
45a34ae0fe
2 files changed
+10
-8
No files matched your search
@@ -1,15 +1,16 @@
|
||||
import React, { useEffect, useState, useRef } from 'react';
|
||||
import { useParams, useLocation } from 'react-router';
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
// TODO: DicomMetadataStore should be injected?
|
||||
import { DicomMetadataStore, ServicesManager } from '@ohif/core';
|
||||
import { DicomMetadataStore, ServicesManager, utils } from '@ohif/core';
|
||||
import { DragAndDropProvider, ImageViewerProvider } from '@ohif/ui';
|
||||
import { useQuery, useSearchParams } from '@hooks';
|
||||
import ViewportGrid from '@components/ViewportGrid';
|
||||
import Compose from './Compose';
|
||||
import getStudies from './studiesList';
|
||||
|
||||
const { getSplitParam } = utils;
|
||||
|
||||
/**
|
||||
* Initialize the route.
|
||||
*
|
||||
@@ -283,13 +284,14 @@ export default function ModeRoute({
|
||||
if (lowerVal !== 'studyinstanceuids') {
|
||||
// Not sure why the case matters here - it doesn't in the URL
|
||||
if (lowerVal === 'seriesinstanceuid') {
|
||||
const seriesUIDs = getSplitParam(lowerVal, query);
|
||||
return {
|
||||
...acc,
|
||||
seriesInstanceUID: query.get(val),
|
||||
seriesInstanceUID: seriesUIDs,
|
||||
};
|
||||
}
|
||||
|
||||
return { ...acc, [val]: query.get(val) };
|
||||
return { ...acc, [val]: getSplitParam(lowerVal, query) };
|
||||
}
|
||||
},
|
||||
{}
|
||||
|
||||
Reference in new issue
Block a user