daybrush / selecto

Selecto.js is a component that allows you to select elements in the drag area using the mouse or touch.
https://daybrush.com/selecto
MIT License
2.04k stars 82 forks source link

keydown event does not appear to be working. #123

Closed sunecosuri closed 1 year ago

sunecosuri commented 1 year ago

Environments

Description

Hi, I'm finding it very useful, but I have one question. the keydown event doesn't seem to be working, am I using it wrong...?

Change the code as follows and run yarn serve to access on http://localhost:8080 after git repo clone. https://github.com/daybrush/selecto/blob/master/packages/vue-selecto/demo/App.vue#L93-L95

--    onKeydown() {
++    onKeydown(event) {
++    console.log(event)
      document.querySelector(".button").classList.add("selected");
    },

Reproduction steps

cd ./packages/vue-selecto
yarn install
// Change the code as above
yarn dev
// access to http://localhost:8080
daybrush commented 1 year ago

@sunecosuri

It doesn't seem to be set to app.vue.

When I do it with app.vue, it works fine.

// demo/index.ts
import Vue from 'vue';
import App from './App.vue';
// import App from './InfiniteViewer.vue';

new Vue({
  render: (h: any) => h(App),
}).$mount('#app');
sunecosuri commented 1 year ago

You made a mistake in your verification process. It worked out fine. Thanks!

sunecosuri commented 1 year ago

@daybrush Please close this issue. Thank you very much.