Skip to content

Commit

Permalink
fix: crm contacrs sort fix [WTEL-4060]
Browse files Browse the repository at this point in the history
  • Loading branch information
VladimirBeria committed Dec 15, 2023
1 parent 618d712 commit 4919b48
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/modules/TableStoreModule/store/TableStoreModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,15 @@ export default class TableStoreModule extends BaseStoreModule {
});
},
UPDATE_HEADER_SORT: (context, { header, nextSortOrder }) => {
const headers = context.state.headers.map((oldHeader) => ({
...oldHeader,
sort: oldHeader.field === header.field
? nextSortOrder
: SortSymbols.NONE,
}));
const headers = context.state.headers.map((oldHeader) => {
const sortFieldValue = oldHeader?.sort;
return {
...oldHeader,
sort: oldHeader.field === header.field
? nextSortOrder
: sortFieldValue,
};
});
context.commit('SET_HEADERS', headers);
},
PATCH_ITEM_PROPERTY: async (context, {
Expand Down

0 comments on commit 4919b48

Please sign in to comment.