Commit dfc0b4d
committed
fix(VueDatePicker): menu not opening when centered prop is enabled
When the centered prop is enabled, the datepicker menu does not open after clicking the input. The issue was caused by the shouldRender ref being initialized as false for non-inline modes, preventing the menu from rendering even when isOpen was true.
Modified shouldRender initialization to include rootProps.centered condition. Now shouldRender is true when either inline.enabled or rootProps.centered is active. The existing watcher logic remains unchanged and only affects floating (non-centered, non-inline) mode.
Added test case to verify menu opens correctly in centered mode.
Changes:
- VueDatePicker.vue
- TestSuite_1.spec.ts
Fixes #11951 parent 193e117 commit dfc0b4d
File tree
2 files changed
+8
-1
lines changed- src/VueDatePicker
- __tests__
2 files changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
| 120 | + | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
63 | 70 | | |
0 commit comments