When editing , previous line items value is retained in dropdowns

When editing , previous line items value is retained in dropdowns

8karthik88karthik8 Posts: 8Questions: 3Answers: 0

Lets say there are 2 line items. I select lineitem1 click Edit and then Update it.
Now I select lineitem2 and click Edit, I see previous lineitem's values (i.e. lineitem1's values ) instead of lineItem2 .

Below is whats happending in the code. When I click on datatable Edit .

debugger is going to all the editor.dependent's like below. editor_preOpen is false here .

''' editor.dependent('Product[].id', function (val, data, callback) {
            if (editor_preOpen) {
                if (val !== null && val !== "null") {
                    editor.field("Audience[].id").val('');
                    GetAudByProductID(val, callback);                    
                }
            }
        });'''

And then it actually goes to preOpen function.
'''editor.on('preOpen', function (e, json, data) '''

If answer is repopulating , where should i do it.

Answers

  • allanallan Posts: 63,205Questions: 1Answers: 10,415 Site admin

    hi,

    Could you give me a link to your page so I can take a look and trace it through please?

    Thanks,
    Allan

  • 8karthik88karthik8 Posts: 8Questions: 3Answers: 0
    edited February 2020

    Hi Allan, Its an internal system , I cannot provide the link

  • 8karthik88karthik8 Posts: 8Questions: 3Answers: 0

    I can provide if you need any other information

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    Would you be able to modify this test case here to demonstrate the issue, please?

    Colin

This discussion has been closed.