Repository navigation
fix(compiler-vapor): set the value of an input after its other props - #15722
edison1105 merged 2 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-sfc
@vue/compiler-ssr
@vue/compiler-vapor
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/runtime-vapor
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
Size ReportBundles
Usages
|
|
The direction looks right, but there are still three gaps worth covering:
Could we add regression tests for these paths, including the max round trip rather than only initial mounting? |
…path Track whether any preceding prop registered an effect instead of only the last one, reapply value after the other props in patchDynamicProps even when unchanged like vdom's full props patch, and stop folding a static input value into the template when type, min, max or step is set at runtime.
360606a to
b2a4c25
Compare
|
Good catches, all three reproduced. Fixed in b2a4c25:
|
On
<input type="range" :value="v" :max="m">vapor setsvaluein source order, beforemax. A range input clamps its value to the currentmax, which is 100 by default, so a value above that is cut and stays cut. vdom appliesvalueafter the other props for this reason (#2325, #4024). Real case: FocusTide inputNumber.vue and lazy-brush Slider.vue, both binding:value,:minand:max. PlaygroundThe compiler now emits
valuelast, andpatchDynamicPropsdoes the same forv-bindobjects.