I have lightning data table with one of the columns associated to Amount field. I want amount values to appear with '$' symbol for which I declared Amount column with type 'Currency' but I was not able to see amount values with '$' or any other currency symbol. As a workaround, I converted the data type of Amount to String and concatenated the '$' symbol :
Column Declaration : const columns = [{ fieldName: "Amount", hideDefaultActions: true, label: "AMOUNT", type: "String", sortable: "true" }];
Evaluation of Amount value : rowData.Amount = "$" + (((obj.amount / 100) + '').indexOf('.') == -1 ? (obj.amount / 100) + '.00' : (obj.amount / 100));
But with this workaround, sorting on Amount field is not working as expected. I am using following code for sorting :
Lightning Datatable html part :
I need both sorting and display of amount values with currency symbol to be working correctly. Any help would be highly appreciated.