It would be great if you can please add the editable option to the MultiSelect component just like the one you can find in the DropDown component, right now if you want the user to add a new tag you have to put another box for them to be able to add new ones.
Is there any already existing workaround for this or where can I submit the suggestion properly?
Thanks!
MultiSelect editable option
-
- Posts: 449
- Joined: 08 Aug 2018, 14:09
Hi,Checkmater wrote: ↑22 Feb 2019, 02:23It would be great if you can please add the editable option to the MultiSelect component just like the one you can find in the DropDown component, right now if you want the user to add a new tag you have to put another box for them to be able to add new ones.
Is there any already existing workaround for this or where can I submit the suggestion properly?
Thanks!
You can use header template. Put inputtext and button in header template, like this;
https://stackblitz.com/edit/github-jawba9
Best Regards.
-
- Posts: 2
- Joined: 12 May 2017, 17:42
I'm afraid that just doesn't cut it. Things don't look right when you use the method above.
the following :
looks like this: (https://ibb.co/zhV6GD5)
It's just about hackable but it's not pretty.
the following :
Code: Select all
<p-multiSelect [options]="cars" [(ngModel)]="selectedCars1" [panelStyle]="{minWidth:'12em'}">
<p-header>
<div class="p-grid">
<div class="p-col-8"><input type="text" pInputText style="min-height:2em"/></div>
<div class="p-col-1"><p-button (click)="add(in)" style="max-height:2em">Add</p-button></div>
</div>
</p-header>
</p-multiSelect>
It's just about hackable but it's not pretty.
-
- Posts: 6
- Joined: 12 Jul 2021, 13:15
Instead of multiselect, the autocomplete can solve your problem. I have created an example on stackblitz.
Here is the link - https://stackblitz.com/edit/primeng-aut ... demo-1yzub
This has a dropdown, it can filters results and also a new entry can be added.
Here is the link - https://stackblitz.com/edit/primeng-aut ... demo-1yzub
This has a dropdown, it can filters results and also a new entry can be added.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 12 guests