Skip to content

useOnScroll throwing errors #684

Open
@ux-engineer

Description

@ux-engineer
  • vue-composable 1.0.0-beta.12
  • vue 2.6.12
  • @vue/composition-api 1.0.0-beta.21
setup: () => {
    const tableElementRef: Ref<HTMLElement | null> = ref(null);

    const { scrollTop, scrollTopTo } = useOnScroll(tableElementRef);
    
    const onClick = async function onClick () {
      // Scroll To Table
      console.debug('tableElementRef', tableElementRef, tableElementRef.value);
      scrollTopTo(scrollTop.value);
      // Fetch via store
      await store.doAction();
    };

    return { tableElementRef, onClick };
}
[Vue warn]: Error in event handler for "hook:beforeUpdate": "TypeError: e.addEventListener is not a function"

TypeError: e.addEventListener is not a function
    addEventListener vue-composable.esm-bundler.js:179
    removeWatch vue-composable.esm-bundler.js:184
    node_modules vue-composition-api.esm.js:1039
    node_modules vue-composition-api.esm.js:982
    node_modules vue-composition-api.esm.js:893
    node_modules vue-composition-api.esm.js:849
    VueJS 7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions