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

Image: indicator slot is without function #5389

Closed
Popeye4242 opened this issue Mar 7, 2024 · 0 comments
Closed

Image: indicator slot is without function #5389

Popeye4242 opened this issue Mar 7, 2024 · 0 comments
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@Popeye4242
Copy link
Contributor

Popeye4242 commented Mar 7, 2024

Describe the bug

In the current primevue version the indicator slot in the Image is without function.

Looking into the code the ImageSlots interface defines the slot as indicator.

export interface ImageSlots {
    /**
     * Custom indicator template.
     */
    indicator(): VNode[];
}

The Image.vue component however has the slot defined as indicatoricon and in the docs the slot is described as indicatoricon.

    <button v-if="preview" ref="previewButton" :aria-label="zoomImageAriaLabel" type="button" :class="cx('button')" @click="onImageClick" v-bind="{ ...previewButtonProps, ...ptm('button') }">
            <slot name="indicatoricon">
                <component :is="indicatorIcon ? 'i' : 'EyeIcon'" :class="cx('icon')" v-bind="ptm('icon')" />
            </slot>
        </button>

Therefore I assume that the TypeScript definition is broken.

Reproducer

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

PrimeVue version

3.49.1

Vue version

3.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

<PrimeVueImage>
      <template #indicator>
        <i class="pi pi-eye text-4xl"></i>
        <span>enlarge</span>
      </template>
<PrimeVueImage>

Expected behavior

The template slot should be used for rendering the indicator. And display a larger eye icon with the text enlarge.

@Popeye4242 Popeye4242 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Mar 7, 2024
@tugcekucukoglu tugcekucukoglu added this to the 3.50.0 milestone Mar 13, 2024
@tugcekucukoglu tugcekucukoglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Mar 13, 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