Skip to content

Conversation

@Antreesy
Copy link
Contributor

☑️ Resolves

  • Follow-up to fix(NcActionRadio): change modelValue to behave like NcCheckboxRadioSwitch #6264
    • Revert Boolean support and default value for modelValue:
      • ⚠️ This is not suppose to work as expected
      • ⚠️ Component emitted only true before, now it's value of prop value
      • @change emit works as before
    • Add Vue warning to push developers to migrate to supported types
    • Drop second emit and ref input
    • Typo fixes

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable
  • 3️⃣ Backport to next requested with a Vue 3 upgrade

@Antreesy Antreesy added 3. to review Waiting for reviews feature: actions Related to the actions components regression Regression of a previous working feature labels Jan 28, 2025
@Antreesy Antreesy added this to the 8.23.0 milestone Jan 28, 2025
@Antreesy Antreesy requested a review from ShGKme January 28, 2025 10:03
@Antreesy Antreesy self-assigned this Jan 28, 2025
setup() {
setup(props) {
if (typeof props.modelValue === 'boolean') {
Vue.util.warn('[NcActionRadio] Boolean type of `modelValue` is deprecated and will be removed in next versions')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be only shown if set initially.
Meaning if the prop is mutated to a boolean it is not shown again

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is enough. If some app used this component with boolean when it was boolean only, it's unlikely it switch to boolean after mounting from something else.

Copy link
Contributor

@susnux susnux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nevertheless good

Copy link
Contributor

@ShGKme ShGKme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@Antreesy Antreesy merged commit 0696745 into master Feb 13, 2025
23 checks passed
@Antreesy Antreesy deleted the fix/6264/action-radio-vmodel branch February 13, 2025 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews feature: actions Related to the actions components regression Regression of a previous working feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants