Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- initTable: function (component, event, helper) {
- console.log("Enter initTable");
- var fieldList = component.get("v.rawFields");
- console.log(fieldList);
- var colList = [];
- for(var i = 0; i < fieldList.length; i++){
- console.log('fieldType ==> ' + fieldList[i].Field_Type__c);
- if(fieldList[i].Field_Type__c == 'detailLink'){
- var colMap = {
- label: fieldList[i].MasterLabel,
- fieldName: fieldList[i].Id,
- type: 'button',
- cellAttributes: { alignment: 'left' },
- typeAttributes: {
- iconName: 'description',
- name: 'viewDetails',
- title: 'Click to view details',
- label: {
- fieldName: fieldList[i].Id
- },
- disabled: false,
- value: 'test',
- variant: 'base'
- }
- }
- }
- else if (fieldList[i].Field_Type__c == 'Checkbox') {
- var colMap = {
- label: fieldList[i].MasterLabel,
- fieldName: 'm01m0000000CwMYAA0',// fieldList[i].Id,
- type: 'boolean'//this.getType(fieldList[i].Field_Type__c),
- };
- } else {
- var colMap = {
- label: fieldList[i].MasterLabel,
- fieldName: fieldList[i].Id,
- type: this.getType(fieldList[i].Field_Type__c)
- }
- }
- colList.push(colMap);
- }
- component.set("v.columns", colList);
- console.log("colList:");
- console.log(colList);
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement