Minor modifications

This commit is contained in:
vdv committed 2022-12-12 21:35:00 +01:00
1 parent daed8e5dc1
commit 56c9eb37bb
5 files changed
+24 -9

No files matched your search

+12 -6
View File
@@ -53,8 +53,15 @@ const GpxDialog: Component<{}> = (props) => {
gpx: gpx(),
});
};
const handleClose = () => {
setOpen(false);
const handleClose = (event: any, reason?: string) => {
console.log({
caller: 'GpxDialog / handleClose',
event,
reason,
});
if (reason === undefined) {
setOpen(false);
}
};
const gpxChangeHandler = async (event: any) => {
setSelectedGpxId(event.target.value);
@@ -178,10 +185,9 @@ const GpxDialog: Component<{}> = (props) => {
>
<For each={allGpxes()}>
{(gpx) => (
<option
value={gpx.id}
selected={gpx.id === selectedGpxId()}
>{`${gpx.name || gpx.id} (${gpx.creator})`}</option>
<option value={gpx.id} selected={gpx.id === selectedGpxId()}>
{gpx.name || `${t('gpxNoName')} (${gpx.creator})`}
</option>
)}
</For>
</NativeSelect>