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

Button: No label #3905

Closed
ineshbose opened this issue Apr 25, 2023 · 0 comments
Closed

Button: No label #3905

ineshbose opened this issue Apr 25, 2023 · 0 comments
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@ineshbose
Copy link
Contributor

Describe the bug

After 3.27, there were a couple of refactored bits released, but that seems to have greatly broken some functionality (in my app at least). More specifically, I refer to the Button component with this LOC:

<template v-if="!$slots.default">

This is causing issues in cases where a wrapper button is created like so:

<Button :label="'fallback text if no slot'" class="my-custom-wrapper-class">
    <slot />
</Button>

Because if this button is used without the inner slot being used, it would be empty but $slots.default would be true. Please refer to the reproduction to see what I'm talking about.

Reproducer

https://stackblitz.com/edit/angular-heuv8g?file=src/App.vue

PrimeVue version

3.27.0

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

@ineshbose ineshbose added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Apr 25, 2023
@mertsincan mertsincan self-assigned this Apr 27, 2023
@mertsincan mertsincan added Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Apr 27, 2023
@mertsincan mertsincan added this to the 3.28.0 milestone Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

2 participants