-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
12868c7
commit e1487f8
Showing
3 changed files
with
22 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 6 additions & 3 deletions
9
...ards/LovsManagementWizardCard/LovsManagementTestDialog/LovsManagementTestDialogHelpers.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
export const removeUnusedVisibleColumnsFromModel = (treeListTypeModel) => { | ||
if (!treeListTypeModel || !treeListTypeModel['VISIBLE-COLUMNS'] || !treeListTypeModel.STMT) return | ||
export const removeUnusedVisibleColumnsFromModel = (treeListTypeModel: any, tableModelForTest: any[]) => { | ||
if (!tableModelForTest || !treeListTypeModel || !treeListTypeModel['VISIBLE-COLUMNS'] || !treeListTypeModel.STMT) return | ||
const visibleColumns = treeListTypeModel['VISIBLE-COLUMNS'].split(',') | ||
const filteredColumns = visibleColumns.filter((column: string) => treeListTypeModel.STMT.includes(column.trim())) | ||
const filteredColumns = visibleColumns.filter((column: string) => { | ||
const index = tableModelForTest.findIndex((columnFromPreviewService: any) => columnFromPreviewService.name === column) | ||
return index !== -1 | ||
}) | ||
treeListTypeModel['VISIBLE-COLUMNS'] = filteredColumns.join(',') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters