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

SplitButton: Main Icon Not Showing Up #5822

Closed
IsaiahSinclairEcoTank opened this issue Jun 3, 2024 · 2 comments
Closed

SplitButton: Main Icon Not Showing Up #5822

IsaiahSinclairEcoTank opened this issue Jun 3, 2024 · 2 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@IsaiahSinclairEcoTank
Copy link

IsaiahSinclairEcoTank commented Jun 3, 2024

Describe the bug

Since updating PrimeVue from an older version (3.33.0) to the latest version (3.52.0), I have encountered an issue where the main icon of a the split button is not showing up, even when specified. An example of this issue is reproduced on one of the PrimeVue website examples: https://primevue.org/splitbutton/#icons. Here, the icon specified for the default option, "Save", is pi pi-check, but it is not shown in the example. However, for all the other options on that specific split button, the icons are shown. The same issue occurs in our application.

Reproducer

https://stackblitz.com/edit/primevue-create-vue-issue-template

PrimeVue version

3.52.0

Vue version

3.x

Language

ALL

Build / Runtime

Vite

Browser(s)

Edge, Chrome

Steps to reproduce the behavior

  1. Create a split button component and specify icons for each specific option, including the default option (like the example from the PrimeVue website copied below)
<template>
    <div class="card flex justify-content-center">
        <Toast />
        <SplitButton label="Save" icon="pi pi-check" menuButtonIcon="pi pi-cog" @click="save" :model="items" />
    </div>
</template>

<script setup>
import { useToast } from "primevue/usetoast";
const toast = useToast();

const items = [
    {
        label: 'Update',
        icon: 'pi pi-refresh',
        command: () => {
            toast.add({ severity: 'success', summary: 'Updated', detail: 'Data Updated', life: 3000 });
        }
    },
    {
        label: 'Delete',
        icon: 'pi pi-times',
        command: () => {
            toast.add({ severity: 'warn', summary: 'Delete', detail: 'Data Deleted', life: 3000 });
        }
    },
    {
        label: 'Vue Website',
        icon: 'pi pi-external-link',
        command: () => {
            window.location.href = 'https://vuejs.org/';
        }
    },
    { label: 'Upload', icon: 'pi pi-upload', to: '/fileupload' }
];

const save = () => {
    toast.add({ severity: 'success', summary: 'Success', detail: 'Data Saved', life: 3000 });
};
</script>
  1. View the component's default option and look for its respective icon -- the icon will not display.

Expected behavior

The default option on the split button should show the icon that it was specified to show, just like the other options.

@IsaiahSinclairEcoTank IsaiahSinclairEcoTank added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jun 3, 2024
@tugcekucukoglu tugcekucukoglu added Resolution: Cannot Replicate Issue could not be replicated by Core Team and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jun 7, 2024
Copy link

github-actions bot commented Jun 7, 2024

We're unable to replicate your issue, if you are able to create a reproducer or add details please edit this issue. This issue will be closed if no activities in 20 days.

@IsaiahSinclairEcoTank
Copy link
Author

IsaiahSinclairEcoTank commented Jun 7, 2024

Hi @tugcekucukoglu, I see that this has been given the tag "Resolution: Cannot Replicate". The issue is replicated in one of the examples on the PrimeVue page, located right here: https://primevue.org/splitbutton/#icons. The icon specified for the main option is a checkmark, but not checkmark is showing. Feel free to let me know if you need any additional details.

@tugcekucukoglu tugcekucukoglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Resolution: Cannot Replicate Issue could not be replicated by Core Team labels Jun 7, 2024
@tugcekucukoglu tugcekucukoglu added this to the 3.53.0 milestone Jun 7, 2024
@tugcekucukoglu tugcekucukoglu self-assigned this Jun 7, 2024
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

No branches or pull requests

2 participants