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!
Buttons don't fire events
-
- Posts: 84
- Joined: 06 Sep 2022, 08:59
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?
Could there be a problem with your extensions for the script setup?
-
- Information
-
Who is online
Users browsing this forum: No registered users and 8 guests