p-multiselect

UI Components for Angular
Post Reply
Angular user
Posts: 1
Joined: 03 Mar 2023, 11:42

03 Mar 2023, 11:58

Hey guys, i got a question with using both dataKey and optionValue.
The problem is
I using multiselect for set some info to formArray, to input im getting an array of formGroup
this._formBuilder.group({
id: [uuidv4()],
name: ['', Validators.required],
type: ['TEXT', Validators.required],
initialValue: ['']
})

to uniquely identify a value in option and to reactively change "name"(there was a problem when i changed "name" data in multiselect became uncheked but it left at formgroup so i was not able to clear or modify data in formArray, "dataKey" helped me to fix this problem, data changed reactively from both sides multiselect and formArray) im using dataKey="id"
Now i got the problem using both using both dataKey and optionValue, i need to pass just "name" to formArray not whole object and when i click on some option multiselect checks all options. PLEASE HELP! :cry:
If you need more info about it, just ask i'll show u all u need

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 24 guests