Skip to content

v-model in BaseRadiobutton.vue doesn't get the value updated #4035

@lukeromanowicz

Description

@lukeromanowicz

Current behavior

Radiobutton falsely looks like it is designed to utilize v-model as the primary way of interacting with passed value. Unfortunately, the value after changing is not being emitted to the parent component, so the only way to use them is to use v-model/value properties for passing values to those components and listening to click events in order to update these values (by guessing that the new state is just the opposite of previous one).

https://github.com/DivanteLtd/vue-storefront/blob/cecca3aa3ed2401f0d1b0045c16fcff65629ccba/src/themes/default/components/core/blocks/Form/BaseRadiobutton.vue#L12

Expected behavior

It should be able to read the radio button state by using the v-model alone.

Steps to reproduce the issue

  1. Place a radio button with v-model property
  2. click it couple of times
  3. watch the v-model property values doesn't change as it should (in fact, it doesn't change at all)

Can you handle fixing this bug by yourself?

  • YES
  • NO

Which Release Cycle state this refers to? Info for developer.

Pick one option.

  • This is a bug report for test version on https://test.storefrontcloud.io - In this case Developer should create branch from develop branch and create Pull Request 2. Feature / Improvement back to develop.
  • This is a bug report for current Release Candidate version on https://next.storefrontcloud.io - In this case Developer should create branch from release branch and create Pull Request 3. Stabilisation fix back to release.
  • This is a bug report for current Stable version on https://demo.storefrontcloud.io and should be placed in next stable version hotfix - In this case Developer should create branch from hotfix or master branch and create Pull Request 4. Hotfix back to hotfix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    1: EasyP3: NormalPriority mark - normal prioritybugBug reports

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions