I'm new to Angular and I'm trying to change the width of a primeng auto complete component to fill the column of a table, I already tried to use
style="width: 100%"
but that doesn't work; I also tried to set this on html but nothing changes
[style]="{'width':'100%'}" [inputStyle]="{'width':'100%'}" class="p-autocomplete"
Current situation:
What I'm failing to do:
primeng version: 9.0.0
link for the the code: https://stackblitz.com/edit/primeng-tablebasic-demo-p9egw5?file=src/app/app.component.html
My english is very poor but you can test this
<td class="p-fluid">
<!-- <input type="text" style="width: 100%" /> -->
<p-autoComplete [(ngModel)]="texts" [suggestions]="results" (completeMethod)="search($event)"
[multiple]="true">
</p-autoComplete>
</td>
I hope willbe helpful.
to me worked that way, font: https://github.com/primefaces/primeng/issues/1552
<td>
<div class="ui-fluid">
<p-autoComplete
styleClass="wid100"
[(ngModel)]="texts"
[suggestions]="results"
(completeMethod)="search($event)"
[multiple]="true">
</p-autoComplete>
</div>
</td>
Which browser do you use? As of Chrome its looks like expected enter image description here
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.