• Thirumagal Siluvaithasan
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 4
    Replies
Hi Team,

I have created a page using LWC and I am using in the community. When I resize the window LWC component is not responsive.

What should I do for this?

Thank You,
Thiru
Hi Team,

I have a wrapper class in my apex controller.
 
global class variableDTO {
        @AuraEnabled
        public String bkImgURL { get; set; }
        @AuraEnabled
        public List<String> monthListBefore {get; set;}
}

And I am trying to to access the monthListBefore list in LWC. My code is below.
 
@track background; 
@track MonthList;

@wire(getAllDTOs) wrappers ({
        error,
        data
    }) {
        if(data) {
            this.objects = data;
            this.background = data[0].bkImgURL;
            this.MonthList = data[0].MonthListBefore;
            console.log(this.background );
            console.log(this.MonthList );
        

        } else {
            this.error = error;
        }
    }
Here I got value for this.background but I got undefined for this.MonthList. Is there anything wrong in my code?

I got value MonthListBefore in json when I debug.
"monthListBefore":[ 
"Avr",
"Mai",
"Jui",
"Jui",
"Aoû",
"Sep",
"Oct",
"Nov",
"Déc"
],

Thank you.

 
Hi Team,

I have for-each loop in my LWC component. And I want to check below condition inside  the loop.
 
<template for:each={object.MonthListBefore} for:item="month" >
      <template if:true={month == 'Jan'}> 
       <li key={object.Id} class="year">{object.currentYear}</li>       
</template>
</template>



But this is not working.  I am not sure how could I use the arithmetic comparison in HTML file of LWC. Could anyone please help me to resolve this?
Hi All, 

I have implemented a search button click function to retrieve and fetch data into table in lightning component.
 
@AuraEnabled
    public static List < Data_Import__c > fetchdata(String statuskey,String versionkey) {
        String status = statuskey;
        String version = versionkey;
        List <Data_Import__c> returnList = new List <Data_Import__c>();
        for (Data_Import__c dataim: [SELECT Name,Error_message__c,version__c,Status__c FROM Data_Import__c WHERE Status__c =: status AND version__c =: version]) {
            returnList.add(dataim);
        }
        return returnList;
    }
 
Search: function(component, event, helper) {
       helper.SearchHelper(component, event);
        
  }

SearchHelper: function(component, event) {
        var action = component.get("c.fetchdata");
        action.setParams({
            'statuskey': component.find("statusId").get("v.value"),
            'versionkey': component.find("versionId").get("v.value")
        });

and its working fine. Now I want to do the same thing using selector pattern.I want to change the code using selector pattern. Can anyone please help me to implement this.

Thank you. 
 
Hi Team,

I have a wrapper class in my apex controller.
 
global class variableDTO {
        @AuraEnabled
        public String bkImgURL { get; set; }
        @AuraEnabled
        public List<String> monthListBefore {get; set;}
}

And I am trying to to access the monthListBefore list in LWC. My code is below.
 
@track background; 
@track MonthList;

@wire(getAllDTOs) wrappers ({
        error,
        data
    }) {
        if(data) {
            this.objects = data;
            this.background = data[0].bkImgURL;
            this.MonthList = data[0].MonthListBefore;
            console.log(this.background );
            console.log(this.MonthList );
        

        } else {
            this.error = error;
        }
    }
Here I got value for this.background but I got undefined for this.MonthList. Is there anything wrong in my code?

I got value MonthListBefore in json when I debug.
"monthListBefore":[ 
"Avr",
"Mai",
"Jui",
"Jui",
"Aoû",
"Sep",
"Oct",
"Nov",
"Déc"
],

Thank you.

 
Hi Team,

I have for-each loop in my LWC component. And I want to check below condition inside  the loop.
 
<template for:each={object.MonthListBefore} for:item="month" >
      <template if:true={month == 'Jan'}> 
       <li key={object.Id} class="year">{object.currentYear}</li>       
</template>
</template>



But this is not working.  I am not sure how could I use the arithmetic comparison in HTML file of LWC. Could anyone please help me to resolve this?