diff --git a/src/components/gpx/GpxViewer.tsx b/src/components/gpx/GpxViewer.tsx index 5a7d458..e347a45 100644 --- a/src/components/gpx/GpxViewer.tsx +++ b/src/components/gpx/GpxViewer.tsx @@ -17,6 +17,7 @@ const GpxViewer: Component = ({ gpxId, restrictToHierarchy }) => { const title = () => { return gpx().metadata.name; }; + return ( = ({ gpxId, restrictToHierarchy }) => { content={undefined} subTree={ - key.startsWith('gpx/') + each={Object.keys(restrictToHierarchy).filter( + (key: string) => + key.startsWith('gpx/') && + (gpx().trk?.includes(key) || + gpx().wpt?.includes(key) || + gpx().rte?.includes(key)) )} > {(key: string) => { diff --git a/src/components/trk/TrkViewer.tsx b/src/components/trk/TrkViewer.tsx index cedcbee..21eb44f 100644 --- a/src/components/trk/TrkViewer.tsx +++ b/src/components/trk/TrkViewer.tsx @@ -1,4 +1,4 @@ -import { Component, createSignal, For, Show } from 'solid-js'; +import { Component, createEffect, createSignal, For, Show } from 'solid-js'; import { peekCachedSignal } from '../../workers/cached-signals'; import Tree from '../tree'; import TrkIcon from '../../icons/human-footprints-svgrepo-com.svg?component-solid'; @@ -48,6 +48,10 @@ const TrkViewer: Component = ({ trkId, restrictToHierarchy }) => { setConfirmDelete(false); }; + createEffect(() => { + console.log({ caller: 'TrkViewer / createEffect', trkId, trk: trk() }); + }); + return ( <>