Appearance
SearchAssets Component ​
File Information ​
- Path:
app/components/search/SearchAssets.vue - Purpose: Search results display component with grid/list view, pagination, and asset cards.
- Type: Search Component
Overview ​
Search results display component with grid/list view, pagination, and asset cards.
Features ​
- List view (
localMode === 'list' && !loading): onev-list-item.table-list-itemper asset, with an optional checkbox column and a "Matched In" cell whenhasMatchColumnis true. - Grid view (
localMode === 'grid' && !loading):v-row.gap-24of asset cards. - Loading skeletons (340c6e0): when
loadingis true the list/grid is not rendered and the component showsSearchListSkeleton(list) orSearchGridAssetsSkeleton :loading="true"(grid) itself. The search page used to render these skeletons next to the component; it now passes:loading="tabSkeleton('assets')"instead. - Matched In column:
hasMatchColumn = props.matchColumn ?? <any row has search matches beyond its name>. PassingmatchColumnforces the column on or off;null/omitted keeps the per-list check. - Share and download dialogs are mounted inside
<ClientOnly>.
Props ​
SearchAssetsProps (app/types/search.ts):
| Prop | Type | Default |
|---|---|---|
digitalAssets | SearchAssetsDigitalAsset[] | required |
totalcount | number | - |
mode | 'list' | 'grid' | 'list' |
modeshow | boolean | false |
selected_items | any[] | - |
checkbox | boolean | false |
flag | string | 'search-bar' |
lastIndex | number | -1 |
matchColumn | boolean | null | - (treated as null) |
loading | boolean | false |
Events ​
| Event | Payload |
|---|---|
update:selected_items | any[] |
view-all | - |
update:mode | 'list' | 'grid' |
update-asset:selectedItems | any[] |
update-last-index | number |
save-search-key | - |
save-search-filter | - |
track | asset |
Usage Example ​
vue
<!-- app/pages/[brand_name]/search.vue -->
<SearchAssets
v-if="tabContent('assets') || tabSkeleton('assets')"
:digitalAssets="digitalAssets"
:mode="assetsMode"
flag="results-page"
:checkbox="true"
:loading="tabSkeleton('assets')"
:selected_items="assetsSelectedItems"
:lastIndex="lastIndexAssets"
/>
<!-- SearchBar.vue dropdown -->
<SearchAssets :digitalAssets="assets" :totalcount="assetCount" flag="search-bar" :match-column="hasMatchColumn" @view-all="redirectToSearch('assets')" />Related Components ​
- See Components Overview for all components
Related Documentation ​
- Components Overview - All components
- Types - TypeScript type definitions
- Styling - SCSS styling system