mirror of
https://github.com/zadam/trilium.git
synced 2025-10-30 11:09:05 +01:00
fix(ribbon): wrong default view type in search
This commit is contained in:
parent
6d09c7116f
commit
b224267e3b
@ -25,7 +25,8 @@ const VIEW_TYPE_MAPPINGS: Record<ViewTypeOptions, string> = {
|
||||
|
||||
export default function CollectionPropertiesTab({ note }: TabContext) {
|
||||
const [ viewType, setViewType ] = useNoteLabel(note, "viewType");
|
||||
const viewTypeWithDefault = (viewType ?? "grid") as ViewTypeOptions;
|
||||
const defaultViewType = (note?.type === "search" ? "list" : "grid");
|
||||
const viewTypeWithDefault = (viewType ?? defaultViewType) as ViewTypeOptions;
|
||||
const properties = bookPropertiesConfig[viewTypeWithDefault].properties;
|
||||
|
||||
return (
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user