Appearance
useSearchAssets Composable ​
File Information ​
- Path:
app/composables/core/components/search/useSearchAssets.ts - Purpose: Search results logic and asset display
- Type: Core Composable
Overview ​
Search results logic and asset display
Features ​
Called by SearchAssets.vue as useSearchAssets(props, { emit }) with SearchAssetsProps.
localModestarts fromprops.mode;localDigitalAssetsholds the rendered rows.- Matched In column (340c6e0):
hasMatchColumn = props.matchColumn ?? localDigitalAssets.some(file => itemSearchMatches(file).length > 0).SearchBar.vuepasses one shared value for assets, collages and folders so the dropdown's single header lines up; the results page does not pass it, so each tab decides from its own rows. - Exposes selection (
toggleSelect,toggleSelectCard), navigation (openAsset(asset, openInNewTab = false)), share (openShareDialog,closeShareAssetDialog,getShareTitle,getShareDescription) and download (downloadFile) helpers used by the component.
Return Type ​
Refer to the composable source code for return type definitions. Composables use TypeScript for type-safe return values.
Parameters ​
Refer to the composable source code for parameter definitions. Composables use TypeScript for type-safe parameters.
Usage Example ​
typescript
import { useSearchAssets } from '~/composables/core/components/search/useSearchAssets'
const { /* destructured return values */ } = useSearchAssets()Related Composables ​
- See Composables Overview for all composables
Related Documentation ​
- Composables Overview - All composables
- Types - TypeScript type definitions
- Components - Components using this composable