I’m trying to listen for taphold
inside a ListItem
with the Svelte version of framework7 but it doesn’t seem to be working. I pass tapHold: true
in the App parameters as the docs say but there’s no entry in the Svelte docs for such an event. Could someone advise?
<script lang="ts">
import ComfyApp, { type SerializedAppState } from "$lib/components/ComfyApp";
import workflowState, { ComfyBoxWorkflow, type WorkflowInstID } from "$lib/stores/workflowState";
import { f7 } from 'framework7-svelte';
import { XCircle } from 'svelte-bootstrap-icons';
import { Page, Navbar, Button, BlockTitle, Block, List, ListItem } from "framework7-svelte"
export let app: ComfyApp | null = null;
async function doLoadDefault() {
f7.dialog.confirm("Would you like to load the default workflow in a new tab?", async () => {
await app.initDefaultWorkflow();
})
}
function onTapHold(e: Event) {
e.preventDefault();
e.stopImmediatePropagation();
f7.dialog.confirm("Do you want to delete this workflow?", async () => {
})
}
</script>
<Page name="home">
<Navbar title="Home Page" />
{#if $workflowState.openedWorkflows}
<List strong inset dividersIos class="components-list searchbar-found">
{#each $workflowState.openedWorkflows as workflow}
<ListItem link="/workflows/{workflow.id}/" title={workflow.attrs.title || `Workflow: ${workflow.id}`} on:taphold={onTapHold}>
</ListItem>
{/each}
</List>
{:else}
(No workflows opened.)
{/if}
<Block strong outlineIos>
<Button fill={true} onClick={doLoadDefault}>Load Default Graph</Button>
</Block>
</Page>