Comments (4)
Hi, @DominikGanic thanks a lot for your request and kind words.
That callback does make sense. There is already PR #48 which adds the exit
event.
I will review and merge it asap. Having a super busy week, that's why couldn't find time and merge that.
v-onboarding
will only emit the close/exit
event. I think letting the users implement their own prompt makes more sense because that looks out of the v-onboarding
's scope for me. I might be wrong, would love to hear your opinions as well.
from v-onboarding.
Thanks again for your answer and don't worry about me, just take your time and relax if you're really busy. :)
It would be awesome if we could listen to the close event (button click close event) and inject our own logic into it - either it should close or not like returning a boolean.
Something like this:
@close="CloseBoarding"
const CloseBoarding = () => {
// any individual logic here like prompts / saving cookie states blabla..
return true; // will close the boarding
return false; // will continue the boarding
};
from v-onboarding.
I would suggest adding your own close listener to your custom UI button like this
<template>
<VOnboardingWrapper>
<VOnboardingStep>
// ...
<button class="close" @click="onClickClose">X</button>
// ...
</VOnboardingStep>
</VOnboardingWrapper>
</template>
<script>
const { start, finish } = useVOnboarding()
const showPrompt = ref(false)
const onClickClose = () => {
showPrompt.value = true
// apply logic here
// if decided to end onboarding:
finish()
// if decided to stay
showPrompt.value = false
}
</script>
from v-onboarding.
🎉 This issue has been resolved in version 2.3.0 🎉
The release is available on:
Your semantic-release bot 📦🚀
from v-onboarding.
Related Issues (20)
- Enabling OverlayInteraction does not prevent click events from being blocked
- Focus on element not working correctly after navigation/redirection
- Ability to track moving target element? HOT 1
- Ability to control where the overlay pops up HOT 2
- `preventOverlayInteraction` doesn't remove all blocking listeners HOT 2
- Add delay and hide / autoHide HOT 3
- Add indicator for previous click HOT 2
- Dialog placement HOT 1
- V-HTML HOT 3
- toRefs expects a reactive object but received a plain one HOT 1
- Inaccessible panel — Off the bottom of the screen HOT 4
- A11y issue - focus should move to the onboarding card when start() is called HOT 4
- Vue app is crashing. Uncaught TypeError: Object(...) is not a function HOT 4
- Attributes as selector HOT 1
- Rectangular highlight area is offset from the target element HOT 2
- Could not find a declaration file for module 'v-onboarding' HOT 5
- vue__WEBPACK_IMPORTED_MODULE_1__.createElementVNode) is not a function HOT 2
- Could not find a declaration file for module 'v-onboarding' HOT 9
- Overlay doesnt cover screen when css attribute zoom < 1 is applied on parent
- Cannot focus to the attached element input after version 2.7.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from v-onboarding.