Pourquoi quand je modifie un champ ca ecarse les autres champs deja remplis?

 <template  if:true={showLookupSearch}>
                                <td>  <c-lookup-search data-field="Value__c"  value={acc.Value__c}   selectedsobject={input4} onsearchstringvaluechange={handleValueChange}    data-index={index} data-id="lookupFi" label="Custom Lookup - Account"   selected-name={acc.Value__c}  recordlimit="10" onlookupselect={handlelookupselectaccount} ></c-lookup-search>  </td>
                                </template>
                                <template  if:false={showLookupSearch}>
                                    <template  if:true={picklistField}>
                                        <template  if:true={picklistValues.data}>
                                        <td>   <lightning-combobox 
                                            data-field="Value__c" data-index={index}  value={acc.Value__c}  data-id="piclistFi"  onchange={handleValueChange} 
                                            options={picklistValues.data.values}> </lightning-combobox> </td>
                                            </template>
                                    </template>
                                    <template  if:false={picklistField}>
                                        <td> <lightning-input type="text"   data-field="Value__c" data-index={index} data-id="textFi" label="Value" value={acc.Value__c} onchange={handleValueChange} ></lightning-input>   </td>
                                    </template>
                                </template>

                                **JS**
                                 var value =    event.detail.childfilter || event.target.value  || event.detail || event.detail.value || event.currentTarget.value;
            this.caseDefaultData[index][field] = value;
            console.log( 'event.detail.childfilter' , event.detail.childfilter );

            console.log( ' event.target.dataset' ,  event.target.dataset.id );

            if ( event.target.dataset.id == 'fielD' && value == 'AccountId') {
                this.showLookupSearch = true;
                this.input4 = 'Account';
                value =    event.detail.value;
                console.log('VALUEE',value);

            }else if(event.target.dataset.id == 'fielD' && value != 'AccountId') {
                if(event.target.dataset.id == 'fielD' && value == 'Status'  ){
                    console.log( 'Helloooo' );
                    value = event.target.value ;
                    this.showLookupSearch = false;
                    this.picklistField = true;

                } else {
                    value = event.target.value ;
                    this.showLookupSearch = false;
                    this.picklistField = false;

                }

Ce que je veux

si je modifie un champ je veux que uniquement le champ que je suis entrain de modifier soit changer pas les autres

Ce que j'obtiens

le nouveau champ ecrase les autres

Aucune réponse