-
Notifications
You must be signed in to change notification settings - Fork 712
Unmount UModal or USlideover when closed #3157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I had this issue also and found that using .reset() after closing and/or before opening my next slideover with different content worked for me.
I'm calling reset within my onSuccess callback, however there should not be a reason that you cannot call it prior to firing just before your open command. Here is an additional example where I call reset outside of the callback.
Hope this helps. |
@robinsimonklein For me, I am using :key on the component Maybe this is related to it as well #3105 |
@robinsimonklein Are you able to test this issue with this PR: #3279 It should solve this issue. Overlays automatically |
ah ok, that's why i passed json objs of users and it showed up only the 1st one, guys can anyone give me a honest review about my slideover+datatable (csutom) createb by me (not vue expert): https://github.com/vitalijalbu/nuxt-ui-starter/blob/main/src/views/pages/users/Index.vue will appreciate it a lot (also if can give like a mark from 1-10 will be helpul): |
here is some chat gpt for ya :)You're doing a great job structuring your component, especially considering you're not a Vue expert. I'll break down your implementation into different aspects and give feedback along with an overall rating. 1. Code Structure & Organization (8/10)✅ Strengths:
🔧 Improvements:
2. Readability & Maintainability (9/10)✅ Strengths:
🔧 Improvements:
3. Functionality & Best Practices (7.5/10)✅ Strengths:
🔧 Improvements:
4. UI & UX Considerations (8/10)✅ Strengths:
🔧 Improvements:
Overall Rating: 8/10You're on the right track! Your implementation is clean, readable, and functional, and with a few refinements (handling deletion properly, improving naming, optimizing reusability), it can be even better. |
@genu Thanks for this PR!
Am I doing something wrong ? |
Hi @robinsimonklein I noticed similar issue when trying to test PRs with the Pinging @benjamincanac to maybe check that. For now, you'd have to clone and checkout the PR branch to test, unfortunatellyu. |
I'd recommend using the commit hash instead of the PR number when using pkg.pr.new: |
Description
Hi there,
First of all, thanks for the amazing work on the v3, it looks really promising !
I'm struggling with USlideover in a CRUD app. What I'm trying to build is a table listing posts (using UTable), from which you can open post details in a USlideover, or open a form to edit this post also in a USlideover. I feel like the programmatic usage of USlideover (with
useSlideover
and a dedicated component) would be the most appropriate. This would also allow me to open posts info or edit form from elsewhere in the app.But I can't get it to work properly. In fact, since the component only mounts once when opening the Slideover for the first time, it seems difficult to change the content at the right time without using tricky workarounds.
So the question : is there already a way to force USlideover to mount/unmount on open/close ? Or should we implement this as a feature (i.e: a
unmount
prop) ?Or, am I doing it wrong and there is a more convenient way to do this ?
Here you can find a small and basic reproduction with just the "show" details slideover : https://codesandbox.io/p/github/robinsimonklein/nuxt-ui-3-crud-slideover/main?import=true or https://github.com/robinsimonklein/nuxt-ui-3-crud-slideover
Thanks for your help!
The text was updated successfully, but these errors were encountered: