1
I’m using the Primeng picklist, just like this tutorial: picklist tutorial
I am using the event onMoveToTarget and onMoveToSource to get the object information:
<p-pickList [source]="listAnotherPermissoes" [target]="listPermissoesOfUser"
sourceHeader="Outras Permissoes" targetHeader="Permissoes do Usuario"
[responsive]="true" filterBy="nome_funcionalidade,nome_perfil,nome_componente"
dragdrop="true"
(onMoveToSource)="deletePermissaoOfUser($event)"
sourceFilterPlaceholder="Formulário, componente ou funcionalidade"
targetFilterPlaceholder="Formulário, componente ou funcionalidade"
[sourceStyle]="{'height':'400px'}" [targetStyle]="{'height':'400px'}">
<ng-template let-up pTemplate="item">
<div class="ui-helper-clearfix">
<div>{{ up.nome_formulario }} - {{up.nome_componente}} - {{ up.nome_funcionalidade }}</div>
</div>
</ng-template>
</p-pickList>
Inside the Component, how can I remove the item (which comes from the event) and update the information on the page and in the database?