Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

fix(menu): allow menu option group to use array prop #503

Merged
merged 2 commits into from
Jan 19, 2022

Conversation

peoray
Copy link
Contributor

@peoray peoray commented Dec 23, 2021

Description

The documentation says CMenuOptionGroup accepts a string, number, Array as a value of the :value attribute. However, when the array is passed, a warning is thrown in the console:

Invalid prop: type check failed for prop "value". Expected String, Number, got Array

However, the component itself works as expected.

This PR fixes the error and allow the value prop to be passed as an array.

Motivation and Context

Fixes #497

How Has This Been Tested?

I tested with Storybook and the error wasn't displayed on the console when the fix was applied

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@changeset-bot
Copy link

changeset-bot bot commented Dec 23, 2021

🦋 Changeset detected

Latest commit: 5f978f7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
nuxt-js Minor
@chakra-ui/vue Minor
@chakra-ui/nuxt Minor
@chakra-ui/theme-vue Minor
chakra-ui-docs Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Dec 23, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

chakra-ui-vue – ./

🔍 Inspect: https://vercel.com/chakra-ui/chakra-ui-vue/CpwnVUQhQwCZpTC8wVcLUgULdc34
✅ Preview: https://chakra-ui-vue-git-fix-c-menu-option-group-prop-error-chakra-ui.vercel.app

@codesandbox-ci
Copy link

codesandbox-ci bot commented Dec 23, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 5f978f7:

Sandbox Source
Chakra UI Vue (0.X) Starter Template Configuration
chakra-ui-nuxt-demo Configuration

Copy link
Collaborator

@codebender828 codebender828 left a comment

Choose a reason for hiding this comment

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

👍🏽 Nice work, @peoray

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CMenuOptionGroup throws a warning when passing an Array as a :value prop
2 participants