Datatable reorder columns when using state management

UI Components for Angular
Post Reply
hugonoro
Posts: 10
Joined: 25 Jul 2018, 15:16

16 Mar 2021, 13:01

Hi guys,
I'm using NGXS as my state management lib. All is working nice and fluid.
The only problem I'm having is when trying to reorder columns in the table. From the moment you use a state management tool a verification is made on object mutations.

Having this, it means whenever I try to reorder the columns I get an error

Code: Select all

Cannot assign to read only property '1' of object '[object Array]'
because apparently the way the columns are reordered is by using a Utils function called

Code: Select all

reorderArray
that uses splice and mutates the object.

Does anyone have this problem or does anyone tried to reorder columns when using a state management tool?

Thanks!

Amaro
Posts: 9
Joined: 01 Mar 2021, 23:49

23 Nov 2022, 01:10

Hi! Encountered the same problem! Did you find a solution?

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests