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

AutoComplete: class style and click event refactor on removetokenicon scoped slot #3899

Closed
service-paradis opened this issue Apr 24, 2023 · 0 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@service-paradis
Copy link

Describe the bug

You added support for custom icons in Primevue 3.27.0 which is really appreciated!

I found there were some missing information when customizing removetokenicon in the AutoComplete component. It would be beneficial if the removal function were passed as scope for this icon slot. Chip component works this way.

Reproducer

https://codesandbox.io/s/kind-star-7g0l7x?file=/src/App.vue

PrimeVue version

3.27.0

Vue version

3.x

Language

TypeScript

Build / Runtime

Vue CLI App

Browser(s)

Version 1.50.114 Chromium: 112.0.5615.49 (Build officiel) (64 bits)

Steps to reproduce the behavior

  1. Customize the removetokenicon on the AutoComplete component. Ex.
  <AutoComplete
      v-model="value"
      :suggestions="items"
      multiple
      @complete="search"
    >
      <template v-slot:removetokenicon>
        <span @click="onClick">x</span>
      </template>
    </AutoComplete>
  1. Type something and select an element.
  2. Try to remove one of the selection.

Expected behavior

I would expect the onClick event to be passed as slot scope so we can call it from our custom icon!

@service-paradis service-paradis 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 24, 2023
@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 Apr 25, 2023
@tugcekucukoglu tugcekucukoglu added this to the 3.28.0 milestone Apr 25, 2023
@tugcekucukoglu tugcekucukoglu self-assigned this Apr 25, 2023
@tugcekucukoglu tugcekucukoglu changed the title AutoComplete: Need more information to close items when customizing token remove icon AutoComplete: class style and click event refactor on removetokenicon scoped slot Apr 26, 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

No branches or pull requests

2 participants