smui sveltekit autocomplete detect scroll event on menu

83 views Asked by At

In a SvelteKit app using Svelte Material UI, I would like to capture scroll event on Autocomplete menu, to load more items.

I tryed this, but without luck:

  <Autocomplete
        menu$onscroll = { () => console.log("SCROLL") }
        menu$onbottomscroll = {() => console.log("SCROLL")}
        bind:this={selector}
        textfield$variant="outlined"
        options={available}
        bind:value
        {label}
        on:SMUIAutocomplete:selected={handleOptionsSelection}
    />

inspecting element i can see:

onscroll="() => console.log("SCROLL")"

on menu ( div class=smui-autocomplete__menu mdc-menu mdc-menu-surface mdc-menu-surface--open

but nothing happens. Why this doesn't work?

0

There are 0 answers