Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BMenuItem: default v-model binding does not work #19

Closed
kikuomax opened this issue Aug 1, 2023 · 1 comment · Fixed by #249
Closed

BMenuItem: default v-model binding does not work #19

kikuomax opened this issue Aug 1, 2023 · 1 comment · Fixed by #249
Assignees
Labels
good first issue Good for newcomers
Milestone

Comments

@kikuomax
Copy link
Collaborator

kikuomax commented Aug 1, 2023

Overview of the problem

Buefy version: buefy-next (67ecf3a)
Vuejs version: 3.3.4
OS/Browser: Safari

Description

The default v-model binding on <b-menu-item> does not work.

Steps to reproduce

<b-menu-item label="Item" v-model="isActive"></b-menu-item>

Expected behavior

<b-menu-item> syncs isActive:

  • <b-menu-item> is activated according to isActive.
  • <b-menu-item> updates isActive according to its active state.

Actual behavior

<b-menu-item> does not sync isActive.

Btw, the explicit v-model binding does the expected behavior:

<b-menu-item label="Item" v-model:active="isActive"></b-menu-item>
@kikuomax
Copy link
Collaborator Author

kikuomax commented Aug 1, 2023

model is deprecated on Vue 3 and won't work:

model: {
prop: 'active',
event: 'update:active'
},

To use default v-model bindings, we have to follow the naming convention:

  • property: modelValue
  • event: update:modelValue

See https://v3-migration.vuejs.org/breaking-changes/v-model.html

@kikuomax kikuomax added the good first issue Good for newcomers label Jan 10, 2024
@kikuomax kikuomax added this to the v0.1.4 milestone Apr 15, 2024
@wesdevpro wesdevpro moved this to 🆕 New in Buefy Vue3 Project Board Apr 15, 2024
@wesdevpro wesdevpro self-assigned this Jun 20, 2024
@wesdevpro wesdevpro moved this from 🆕 New to 🏗 In progress in Buefy Vue3 Project Board Jun 20, 2024
wesdevpro added a commit that referenced this issue Jun 20, 2024
Fixes: #19
- Migrates MenuItem's `model` prop to `modelValue`.
   - Updates the `model` prop's name to `modelValue`.
   - Updates the `model` prop's event.
   - Updates what the MenuItem emits for the model prop
(Source: https://v3-migration.vuejs.org/breaking-changes/v-model.html)
@wesdevpro wesdevpro moved this from 🏗 In progress to 👀 In review in Buefy Vue3 Project Board Jun 20, 2024
@wesdevpro wesdevpro linked a pull request Jun 20, 2024 that will close this issue
kikuomax added a commit that referenced this issue Jul 14, 2024
I rewrite the CHANGELOG according to my preference, however we should
discuss and establish a minimum guideline for the CHANGELOG.

Categorizes the issue #19 as a "Breaking changes".

Removes "Fix" prefixes in the "Fixes" section because they look
redundant. Writes the issues instead of the solutions in the headlines.

Moves the issue #178 to a new category "Fixes (docs)"
because it does not matter to the core buefy-next library.

Adds the following fixes:
- #23
- #257
- #171 (docs)
wesdevpro pushed a commit that referenced this issue Jul 15, 2024
I rewrite the CHANGELOG according to my preference, however we should
discuss and establish a minimum guideline for the CHANGELOG.

Categorizes the issue #19 as a "Breaking changes".

Removes "Fix" prefixes in the "Fixes" section because they look
redundant. Writes the issues instead of the solutions in the headlines.

Moves the issue #178 to a new category "Fixes (docs)"
because it does not matter to the core buefy-next library.

Adds the following fixes:
- #23
- #257
- #171 (docs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants