mirror of
https://github.com/zadam/trilium.git
synced 2026-01-23 06:54:28 +01:00
feat(launch_bar): horizontal scroll using mouse wheel
This commit is contained in:
parent
f5f38ca670
commit
facd03b6ad
@ -10,6 +10,7 @@ import SyncStatus from "./SyncStatus";
|
||||
import HistoryNavigationButton from "./HistoryNavigation";
|
||||
import AiChatButton, { CommandButton, CustomWidget, NoteLauncher, QuickSearchLauncherWidget, ScriptLauncher, TodayLauncher } from "./LauncherDefinitions";
|
||||
import { useTriliumEvent } from "../react/hooks";
|
||||
import { onWheelHorizontalScroll } from "../widget_utils";
|
||||
|
||||
export default function LauncherContainer({ isHorizontalLayout }: { isHorizontalLayout: boolean }) {
|
||||
const childNotes = useLauncherChildNotes();
|
||||
@ -22,6 +23,7 @@ export default function LauncherContainer({ isHorizontalLayout }: { isHorizontal
|
||||
flexGrow: 1,
|
||||
flexDirection: isHorizontalLayout ? "row" : "column"
|
||||
}}
|
||||
onWheel={isHorizontalLayout ? onWheelHorizontalScroll : undefined}
|
||||
>
|
||||
{childNotes?.map(childNote => {
|
||||
if (childNote.type !== "launcher") {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user