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

Clusterize.js making element unclickable #185

Open
Osman-Rafi opened this issue Feb 1, 2022 · 1 comment
Open

Clusterize.js making element unclickable #185

Osman-Rafi opened this issue Feb 1, 2022 · 1 comment

Comments

@Osman-Rafi
Copy link

I'm trying to use Clusterize.js component to display large amount of data in my vue app. It's showing the dataset perfectly, however, while the clusterize element contains a button or something else which contains a click event, It's not working. I understand this component requires special click event fashion(described in docs FAQ), but can't find a way to use with dynamic data in vue app.

Here is the code sample

<div
      id="scrollArea"
      class="clusterize-scroll"
      style="height: 300px; overflow: auto"
    >
      <div id="contentArea" class="clusterize-content">
        <div v-for="item in dataSet" :key="item">
          <button @click="onClick(item)" data-action="onClick">
            button {{ item }}
          </button>
        </div>
      </div>
 </div>

 <script>
 mounted() {
    new Clusterize({
      scrollId: "scrollArea",
      contentId: "contentArea",
    });
  },

 </script>

Sandbox link: https://codesandbox.io/s/eloquent-tereshkova-wisf1?file=/src/App.vue

@benoitlahoz
Copy link

Same here in Vue 3. Did you ever find an answer to 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

2 participants