mirror of
https://github.com/zadam/trilium.git
synced 2025-10-30 19:19:03 +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) {
|
export default function CollectionPropertiesTab({ note }: TabContext) {
|
||||||
const [ viewType, setViewType ] = useNoteLabel(note, "viewType");
|
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;
|
const properties = bookPropertiesConfig[viewTypeWithDefault].properties;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user