Skip to content

Select: Invalid padding calc when clear icon present #5847

@nfejzic

Description

@nfejzic

Describe the bug

When using Select component with show-clear property and long enough text the padding is not correctly set and the clear button overlaps the text.

See this example:

image

I have a fix for this and will open a PR in a moment.

Reproducer

https://stackblitz.com/edit/vitejs-vite-uhadb8?file=src%2FApp.vue

PrimeVue version

4.0.0-beta.4

Vue version

3.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

Chrome 125.0.6422.142

Steps to reproduce the behavior

  1. Create a Select component
  2. Add show-clear prop
  3. Have selected value have long-enough label
  4. The clear button will overlap the label

Expected behavior

The clear button should be separated from the label by some distance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugIssue contains a bug related to a specific component. Something about the component is not working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions