Skip to content

Remove global x-model radio flag and add regression tests#4753

Closed
utsavsomaiya wants to merge 1 commit intoalpinejs:mainfrom
utsavsomaiya:rmove-global-frommodel-flag
Closed

Remove global x-model radio flag and add regression tests#4753
utsavsomaiya wants to merge 1 commit intoalpinejs:mainfrom
utsavsomaiya:rmove-global-frommodel-flag

Conversation

@utsavsomaiya
Copy link

Summary

  • replace the global window.fromModel flag with an explicit internal { fromModel: true } option when syncing x-model values
  • thread the new option through bind() -> bindInputValue() for radio handling
  • add Vitest coverage for radio behavior with and without model-driven updates

Why

Using a global flag for model synchronization can leak state and cause unintended coupling. This change keeps model context explicit and local.

Testing

  • npm run vitest
  • npm run build

@utsavsomaiya utsavsomaiya deleted the rmove-global-frommodel-flag branch February 28, 2026 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants