[Bug Report] v-expansion-panel input event only fires on initial expansion or closing
See original GitHub issueVersions and Environment
Vuetify: 1.0.0-beta.6 Vue: 2.5.5 Browsers: Chrome 63.0.3239.132 OS: Windows 10
Steps to reproduce
- In my codesandbox example above, Section 1 is open by default.
- Open the Console pane.
- Click on Section 3 (or something other than 1) repeatedly.
Expected Behavior
I’d expect the input event to fire with a true
every time the expansion panel is opened, and with a false
every time it is closed.
Actual Behavior
Only the first/new true
input event is fired for any given section, while a close does successfully fire the input=false
case for all closes. If you click to open and close Section 3 repeatedly, you see open,close,(nothing),close,(nothing),close,(nothing),close … so only the first open for that section. Only the input=false
events come in, not the input=true
cases.
Reproduction Link
https://codesandbox.io/s/l99jy01w79?module=%2Fexpander.vue
Other comments
I’m not sure if it’s a bug but it seems unexpected and inconsistent at least. The purpose is due to an apparently limitation (can’t move the expand arrows to the left side?) but the actual issue is that the input
event is only triggered the first time an expansion box is opened (and yet every time it is closed). This sandbox example demonstrates this if you have the Console window open.
Perhaps there’s a better way to hook the open/close (and ideally there would just be a left-arrow
prop or something to move it to the left) but maybe input isn’t the best even for that. Any other ways to track the expand/collapse events? Still, the input
event seems one-sided with only the false
cases being passed on the event.
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (8 by maintainers)
Unfortunately I do not have the time to delve into this specific bug any further. And since #3271 provides a proper way of achieving the same functionality, I will be closing this issue.
Should this bug show up in any other context we will take another look.
Here’s a slightly modified version of your codepen that adds an extra panel to the end and opens it by default: https://codepen.io/paulw/pen/BYJxyN?editors=1011 Change the
:value=true
to:value=false
to have it closed by default, change that at runtime to programmatically open or close it (like the Prev/Next buttons in my codesandbox example).It seems that adding this
:value
prop prevents the open/expand case from sending thetrue
event, while not preventing the closefalse
case from being reported.