primevue icon indicating copy to clipboard operation
primevue copied to clipboard

IconField: Doesn't work with InputNumber

Open slavco86 opened this issue 1 year ago • 3 comments

Describe the bug

IconField does not work when used together with InputNumber due to how InputNumber is structured, wrapping the input

Reproducer

https://stackblitz.com/edit/zwobe8?file=src%2FApp.vue

PrimeVue version

3.51.0

Vue version

3.x

Language

TypeScript

Build / Runtime

Vue CLI App

Browser(s)

No response

Steps to reproduce the behavior

Go to repro link and observer the difference in rendering between using NumberInput and TextInput

Expected behavior

Should support using IcondField with NumberInput the same way as it does for TextInput

slavco86 avatar Jul 05 '24 11:07 slavco86

+1

Lerwox avatar Oct 04 '24 06:10 Lerwox

I added a potential fix that the core team can better evaluate, but as you pointed out the markup causes the issue given the theme adding the extra padding only when the input field is a direct ancestor. If not done so already, you should be able to override with a similar CSS rule locally.

WatCodeDatCode avatar Oct 04 '24 12:10 WatCodeDatCode

+1, really want this!

james-onpoint avatar Oct 20 '24 13:10 james-onpoint

It would be great to see IconField work on all inputs

james-astra avatar Jan 23 '25 19:01 james-astra

Same here, this would be very useful.

AlexDanault avatar Jun 28 '25 15:06 AlexDanault