Buttons don't fire events

UI Components for Vue
Post Reply
ZEER0H
Posts: 1
Joined: 27 Jan 2023, 22:19

27 Jan 2023, 22:27

I'm running into a situation where I am doing the following:

import Button from 'primevue/button';
<Button @click="handleClick($event)" label="prime"/>
<button @click="handleClick($event)">not prime</button>
<template>
<Button
</template>

<script setup>
const handleClick = (event)=>{
console.log(event)
}
</script>


When I click the prime button... Nothing happens. When I click the normal button, it works.
I have other prime components that work fine, such as a datatable, so I know the setup is at least partially fine. I'm not sure why the button doesn't fire. Please help!

bahadirsofuoglu
Posts: 84
Joined: 06 Sep 2022, 08:59

30 Jan 2023, 12:18

Hi, When I tried to replicate this code I couldn't find any problem.
Could there be a problem with your extensions for the script setup?

Post Reply

Return to “PrimeVue”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 8 guests