diff --git a/src/component-library/features/search/DIDSearchPanel.tsx b/src/component-library/features/search/DIDSearchPanel.tsx index 9c7c096f..c4df8704 100644 --- a/src/component-library/features/search/DIDSearchPanel.tsx +++ b/src/component-library/features/search/DIDSearchPanel.tsx @@ -16,6 +16,8 @@ interface SearchPanelProps { isRunning: boolean; } +type SearchType = DIDType | 'all'; + export const DIDSearchPanel = (props: SearchPanelProps) => { // Try retrieving initial search parameters let initialScope: string | undefined, initialName: string | undefined; @@ -42,7 +44,7 @@ export const DIDSearchPanel = (props: SearchPanelProps) => { const [scope, setScope] = useState(initialScope ?? null); const [name, setName] = useState(initialName ?? null); - const [type, setType] = useState(DIDType.DATASET); + const [type, setType] = useState('all'); const scopeInputRef = useRef(null); const nameInputRef = useRef(null); @@ -84,8 +86,10 @@ export const DIDSearchPanel = (props: SearchPanelProps) => { const params = new URLSearchParams({ query: `${scope}${SCOPE_DELIMITER}${name}`, - type: type, }); + if (type !== 'all') { + params.append('type', type); + } const url = '/api/feature/list-dids?' + params; props.startStreaming(url); @@ -111,12 +115,13 @@ export const DIDSearchPanel = (props: SearchPanelProps) => { return (
- setType(value as SearchType)} defaultValue={type}> + All Container Dataset File @@ -151,4 +156,4 @@ export const DIDSearchPanel = (props: SearchPanelProps) => {
); -}; +}; \ No newline at end of file