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

Dropdown: Incorrect prop declaration #4225

Closed
Magiczne opened this issue Jul 31, 2023 · 0 comments · Fixed by #4226
Closed

Dropdown: Incorrect prop declaration #4225

Magiczne opened this issue Jul 31, 2023 · 0 comments · Fixed by #4226
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@Magiczne
Copy link
Contributor

Magiczne commented Jul 31, 2023

Describe the bug

BaseDropdown.vue component has incorrectly defined props:

Fragment from BaseDropdown.vue, lines 153-164

 props: {
        modelValue: null,
        options: Array,
        optionLabel: String || Function,
        optionValue: String || Function,
        optionDisabled: String || Function,
        optionGroupLabel: String || Function,
        optionGroupChildren: String || Function,
        scrollHeight: {
            type: String,
            default: '200px'
        },

optionLabel, optionValue, optionDisabled, optionGroupLabel, optionGroupChildren should be defined as [String, Function].

Currently it is producing errors in console.
image

Reproducer

<Dropdown :options="[]"
          :option-label="value => value" />

PrimeVue version

3.31

Vue version

3.x

Language

TypeScript

Build / Runtime

Vue CLI App

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@Magiczne Magiczne added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jul 31, 2023
@tugcekucukoglu tugcekucukoglu added this to the 3.31.1 milestone Aug 2, 2023
@tugcekucukoglu tugcekucukoglu added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Aug 2, 2023
@mertsincan mertsincan removed the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants