Trak delete (again).

This commit is contained in:
Eric van der Vlist 2023-01-09 14:40:37 +01:00
parent 9931887f03
commit 1f3c1c750e
2 changed files with 12 additions and 3 deletions

View File

@ -17,6 +17,7 @@ const GpxViewer: Component<Props> = ({ gpxId, restrictToHierarchy }) => {
const title = () => {
return gpx().metadata.name;
};
return (
<Tree
title={
@ -30,8 +31,12 @@ const GpxViewer: Component<Props> = ({ gpxId, restrictToHierarchy }) => {
content={undefined}
subTree={
<For
each={Object.keys(restrictToHierarchy).filter((key: string) =>
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) => {

View File

@ -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<Props> = ({ trkId, restrictToHierarchy }) => {
setConfirmDelete(false);
};
createEffect(() => {
console.log({ caller: 'TrkViewer / createEffect', trkId, trk: trk() });
});
return (
<>
<Tree