primeng icon indicating copy to clipboard operation
primeng copied to clipboard

InputGroup with AutoComplete Triggers Style with 1% Width

Open charleshall888 opened this issue 5 years ago • 9 comments

[X] bug report 

Current behavior This code in the primeng.css is causing our auto-complete components to have a width of 1%.

.p-inputgroup .p-inputtext,
.p-fluid .p-inputgroup .p-inputtext,
.p-inputgroup .p-inputwrapper,
.p-inputgroup .p-inputwrapper > .p-component {
    flex: 1 1 auto;
    width: 1%;
}

image

Expected behavior I would expect that this style is supposed to be setting the width to 100%. In previous versions of PrimeNG this was not being set to 1%.

Minimal reproduction of the problem with instructions Place a p-inputgroup-addon next to a p-autoComplete inside of a p-inputgroup

    <span class="p-inputgroup-addon"><i class="pi pi-search"></i></span>
    <p-autoComplete> </p-autoComplete>
</div>
  • Angular version: 13.0.2
  • PrimeNG version: 13.0.0-rc.2

charleshall888 avatar Nov 15 '21 19:11 charleshall888

I have the same problem. Please, fixx it.

  • PrimeNG version: 12.2.0

AlbaSS18 avatar Jan 31 '22 12:01 AlbaSS18

Hi,

This will be fixed in the future releases, by then you can use styleClass of autoComplete component https://stackblitz.com/edit/github-hsehe7?file=src%2Fapp%2Fapp.component.html

Regards

cetincakiroglu avatar Mar 30 '22 13:03 cetincakiroglu

The bug applies also to p-dropdown when using it with p-inputgroup. Please add both cases also to the demo page.

https://primefaces.org/primeng/inputgroup

mattlocker avatar May 27 '22 09:05 mattlocker

Hi,

So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation. If there is no improvement on this, can you reopen the issue so we can include it in our roadmap? Please don't forget to add your feedback as a comment after reopening the issue. These will be taken into account by us and will contribute to the development of this feature. Thanks a lot for your understanding!

Best Regards,

mertsincan avatar Nov 09 '22 20:11 mertsincan

this is still happening

gbarrionuevo avatar Aug 22 '24 17:08 gbarrionuevo

@mertsincan bugs still happen in v17.18.11

sonicwong avatar Oct 18 '24 09:10 sonicwong

@mertsincan still reproducible in 18.0.0

antoniobuyukluev avatar Dec 09 '24 15:12 antoniobuyukluev

still a bug in 19, not that anybody at @primetek cares

Medioman92 avatar Jul 04 '25 21:07 Medioman92

This is still an issue for v19. It should be marked as open. The workaround for v19 is to wrap the autocomplete in a div with class="w-full" (if using their flexbox css) or style="width: 100%". Setting the width to 100% using the styleClass and inputStyleClass on the autocomplete does not work.

There is a smilar issue with a dropdown in the input group if the dropdown has filter turned on. This css as a global fixes that issue:

.p-inputgroup .p-inputtext { width:100% !important; }

AlejandroFlorin avatar Aug 01 '25 20:08 AlejandroFlorin