Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Error] Uncaught TypeError: Cannot read properties of undefined (reading 'addEventListener') #665

Open
KiddoV opened this issue Aug 29, 2023 · 0 comments

Comments

@KiddoV
Copy link

KiddoV commented Aug 29, 2023

I got error when first time try using this lib with Svelte framework.

<script lang="ts">
import { onMount } from 'svelte';
import Spreadsheet from "x-data-spreadsheet";

export let sheetInstance: Spreadsheet = Object.create(null);

let tableElement: HTMLElement;

onMount(() => {
    console.log(sheetInstance);
    sheetInstance = new Spreadsheet(tableElement, {
        
    });
    sheetInstance.loadData({});
    console.log(sheetInstance);
});

</script>

<!-- The View -->
<div bind:this={tableElement}></div>

<!-- CSS -->
<style lang="scss">

</style>

Any idea what's causing this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant