function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Abilash.SAbilash.S 

Lightning combobox field value changes when lwc page changed

Hi Everyone.
I have used lwc lightning combobox to fetch picklist values. Here user enters combo box field values in second page. When user navigated to third page and again visited second page the field value displays as None (which is a placeholder in html). Again user enters value. This makes dual work to user and not user friendly.
How to store picklist value in combo box field when user navigated from 3 page to 2 page or 2 page to 1 page and 1 page to 2 page. The value should not chnage which is given bu user.

How to over come this.

-----------html---------
<lightning-combobox data-id={skill.Skill__c} data-name="Rating__c" label="Self Evaluation"
                                        value={selectedValue} placeholder="--None--" options={skillOptions}
                                        onchange={handleSkillsChange} >
                                        </lightning-combobox>
----------js--------------
 @wire(getObjectInfo, { objectApiName: SKILL_MATRIX_OBJECT })
    skillMatrixObjectInfo;
    @wire(getPicklistValuesByRecordType, { objectApiName: SKILL_MATRIX_OBJECT, recordTypeId: '$skillMatrixObjectInfo.data.defaultRecordTypeId'})
    skillMatrixPicklistValues({data,error})
    {
        if(data) {
            this.skillOptions = [{selected: true },...data.picklistFieldValues.Rating__c.values]
        }
        console.log('this.skillOptions ',this.skillOptions);
    }

-----------------------------------------------------

Note: The component is a communication between parent to child.
Am I doing any mistake while passing any attributes in child.
---child----
<template>
    <c-employee-skillset record-id={recordId}>
    </c-employee-skillset>
</template>
-------js-------
import skills from './employeeSkills.html';

@api
    save(){
        switch(this.templateName){
          
            case "skills" :
                this.template.querySelector("c-employee-skillset").saveSkills();
                break;
          
        }
    }