-
-
Notifications
You must be signed in to change notification settings - Fork 133
-
We are testing out free version of CoreUI 4 for Vue, and are having trouble registering events (for example click) on simple components like CButton. Is there a recommended way to this? Is this maybe only available on PRO version?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 2 comments 9 replies
-
Can you show some code for a CButton that's not working for you? If there's one thing a button should be able to do, that's click! 😉
Beta Was this translation helpful? Give feedback.
All reactions
-
for example, we tried adding @click event listener on CButton, but click event didn't register:
<c-button @click="login" :disabled="isLoading" color="primary" type="submit" class="px-4" > Login </c-button>
If we add a wrapper div around it, and place the @click event listener there, it registers the click.
Beta Was this translation helpful? Give feedback.
All reactions
-
@aviatmcel I will try to release the fix tomorrow.
BTW. I replied to your support ticket 2 days ago, did you get my email?
Beta Was this translation helpful? Give feedback.
All reactions
-
Can you try to remove this line :disabled="isLoading"
and check.
If disabled is to true then the button doesn't emit the event.
Beta Was this translation helpful? Give feedback.
All reactions
-
hmm no, removing :disabled="isLoading"
also didn't help.
I can make it work by adding .native to @click, like this:
<c-button @click.native="login">Login CB</c-button>
Maybe I forgot to import some part of CoreUI lib? I have these imports in main.js:
import '@coreui/coreui/dist/css/coreui.min.css';
import CoreUI from '@coreui/vue';
app.use(CoreUI);
BTW, still not getting any email response from support :)
Beta Was this translation helpful? Give feedback.
All reactions
-
Please change import CoreUI from '@coreui/vue';
=> import CoreuiVue from '@coreui/vue'
, and app.use(CoreUI);
=> app.use(CoreuiVue);
Beta Was this translation helpful? Give feedback.
All reactions
-
hmm, changed this, but its still the same, only works with @click.native
Beta Was this translation helpful? Give feedback.
All reactions
-
@aviatmcel please update to version v4.2.0
Beta Was this translation helpful? Give feedback.