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: with template and no placeholder shows p-emptylabel as placeholder #2751

Closed
mattiapv opened this issue Jul 3, 2022 · 0 comments
Closed
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@mattiapv
Copy link

mattiapv commented Jul 3, 2022

Describe the bug

Dropdown with template and no placeholder shows p-emptylabel as placeholder:

Use this codesandbox and add this dropdown

<Dropdown
      v-model="selectedCountry"
      :options="countries"
      optionLabel="name"
      :filter="true"
      :showClear="true"
    >
      <template #value="slotProps">
        <div class="country-item country-item-value" v-if="slotProps.value">
          <img
            src="https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png"
          />
          <div>{{ slotProps.value.name }}</div>
        </div>
      </template>
      <template #option="slotProps">
        <div class="country-item">
          <img
            src="https://www.primefaces.org/wp-content/uploads/2020/05/placeholder.png"
          />
          <div>{{ slotProps.option.name }}</div>
        </div>
      </template>
    </Dropdown>

Reproducer

No response

PrimeVue version

3.15.0

Vue version

3.x

Language

ALL

Build / Runtime

Vite

Browser(s)

Chrome

Steps to reproduce the behavior

No response

Expected behavior

No placeholder

@mattiapv mattiapv added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Jul 3, 2022
@tugcekucukoglu tugcekucukoglu added this to the 3.15.1 milestone Jul 4, 2022
@tugcekucukoglu tugcekucukoglu self-assigned this Jul 4, 2022
tugcekucukoglu added a commit that referenced this issue Jul 4, 2022
Fixed #2751 - Dropdown: with template and no placeholder shows p-empt…
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