Comments (5)
MM not sure if that it's possible in that way but definitely a desired feature that Ill add to my to-do list
IN the meantime maybe you can add an observer to the show value to prevent to change (not tested)
watch: {
show(show) {
if (!show && *wantToPrevent*) {
this.show = true
}
}
}
from vue-tailwind.
Using a watcher doesn't worked, but i've made to get it work adding a logic to the before-close event handler that reopens the modal in a way the user doesn't notice.
It still isn't the best solution because the modal's DOM element gets removed and then created again in the next window frame. In my case i have a switch and a spinning animation on the submit button, and both of them gets reseted, which is not desired.
Anyway, this is the logic i'm using, i hope it to be helpful for somebody. ^_^
beforeClose () {
if(!wantToPrevent) return
const scrollTopBefore = this.$refs.modal.$el.scrollTop
this.$nextTick(() => {
this.show = true
this.$nextTick(() => {
this.$refs.modal.$el.scrollTo(0, scrollTopBefore)
})
})
}
from vue-tailwind.
Encountered the same problem as @maverick504, need to perform some checking before actually closing the modal. This functionality is already described in the docs: https://vue-tailwind.com/components/modal.html#events but it doesn't seem to be working in ^0.4.6
from vue-tailwind.
This should be fixed in this pr https://github.com/alfonsobries/vue-tailwind/pull/57/files that ill release tonight
from vue-tailwind.
upgrade to v1.1.5 that should solve the problem
from vue-tailwind.
Related Issues (20)
- Provide ES build
- TRichSelect - Buttons in DropdownUp and DropdownDown do not register click in Safari
- How to display Datepicker only year?
- [help wanted] t-rich-select grouping options HOT 1
- How to blur T-rich-select dropdown upon select
- Dropdown without JavaScript
- <router-link>'s tag prop is deprecated
- Pagination in Rich Select HOT 3
- Semantic TCard (and others)
- not working with vueJS3
- Checkbox not working, value never changes HOT 2
- 🚨 [Important]: project status
- Header Modal Customize
- Variants don't work
- How use t-dropdown in file .tsx HOT 1
- Build for production with Vite? HOT 9
- Rich Select multiple placeholder not rendering
- Time in french
- Can't see search results in TRichSelect when using the fetchOptions method HOT 1
- Pass additional variable to fetchOptions HOT 2
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 vue-tailwind.