Skip to content

Commit

Permalink
Fixed issue where hidden columns breaking column retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
tomansley committed Nov 22, 2024
1 parent 9777f6d commit 714f465
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions force-app/main/default/classes/ListViewCustomManual.cls
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @description :
* @author : [email protected]
* @last modified on : 09-13-2024
* @last modified on : 11-20-2024
* @last modified by : [email protected]
* Modifications Log
* Ver Date Author Modification
Expand Down Expand Up @@ -286,23 +286,26 @@ public with sharing class ListViewCustomManual extends ListViewCustomManualAbstr
Integer columnIndex = 1;
for (ListViewHelper.StandardColumn column: cols.values())
{
FieldWrapper field = new FieldWrapper(column.label,
column.type,
column.fieldNameOrPath,
columnIndex);
if (dataRows?.size() > 0 && !column.hidden)
{
FieldWrapper field = new FieldWrapper(column.label,
column.type,
column.fieldNameOrPath,
columnIndex);

field.setFunction(column.function);
field.setFunction(column.function);

if (sortDataByFieldName.containsKey(column.fieldNameOrPath))
{
field.sortIndex = String.valueOf(sortDataByFieldName.get(column.fieldNameOrPath).sortIndex);
field.sortDir = sortDataByFieldName.get(column.fieldNameOrPath).sortDirection;
}
if (sortDataByFieldName.containsKey(column.fieldNameOrPath))
{
field.sortIndex = String.valueOf(sortDataByFieldName.get(column.fieldNameOrPath).sortIndex);
field.sortDir = sortDataByFieldName.get(column.fieldNameOrPath).sortDirection;
}

rows.addFieldMetaData(field);
rows.addFieldMetaData(field);

columns.add(column);
columnIndex++;
columns.add(column);
columnIndex++;
}
}

//get all preset column widths
Expand Down

0 comments on commit 714f465

Please sign in to comment.