- Thirumagal Siluvaithasan
- NEWBIE
- 10 Points
- Member since 2017
-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
4Questions
-
4Replies
LWC page in community not responsive when I minimize the window.
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
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
-
- Thirumagal Siluvaithasan
- January 17, 2020
- Like
- 0
- Continue reading or reply
Access the list in wrapper class to LWC
Hi Team,
I have a wrapper class in my apex controller.
And I am trying to to access the monthListBefore list in LWC. My code is below.
I got value MonthListBefore in json when I debug.
Thank you.
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.
-
- Thirumagal Siluvaithasan
- January 07, 2020
- Like
- 0
- Continue reading or reply
Using arithmetic comparison in if:true statement in Lightning web component
Hi Team,
I have for-each loop in my LWC component. And I want to check below condition inside the loop.
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?
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?
-
- Thirumagal Siluvaithasan
- January 07, 2020
- Like
- 0
- Continue reading or reply
Selector Pattern in Lightning Component
Hi All,
I have implemented a search button click function to retrieve and fetch data into table in lightning component.
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.
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.
-
- Thirumagal Siluvaithasan
- March 23, 2018
- Like
- 0
- Continue reading or reply
Access the list in wrapper class to LWC
Hi Team,
I have a wrapper class in my apex controller.
And I am trying to to access the monthListBefore list in LWC. My code is below.
I got value MonthListBefore in json when I debug.
Thank you.
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.
- Thirumagal Siluvaithasan
- January 07, 2020
- Like
- 0
- Continue reading or reply
Using arithmetic comparison in if:true statement in Lightning web component
Hi Team,
I have for-each loop in my LWC component. And I want to check below condition inside the loop.
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?
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?
- Thirumagal Siluvaithasan
- January 07, 2020
- Like
- 0
- Continue reading or reply