Values are getting submitted even though they are unchanged.
Values are getting submitted even though they are unchanged.
 networkadmin@asaiatm.com            
            
                Posts: 8Questions: 4Answers: 0
networkadmin@asaiatm.com            
            
                Posts: 8Questions: 4Answers: 0            
            i have inline as well as edit icon top change the data with multiple select fields, but if i change one field the other 5 are also gettting submitted although I have form options provided.
Can you let me know why values are submitted even though options re provided.
editor.on(" edit ", function() {editor.off("preClose");}).on("open", function() {           
                openVals = JSON.stringify(editor.get());
                editor.on("preClose", function(e) {                   
                    if (openVals !== JSON.stringify(editor.get())) {
                        return confirm(
                            "You have unsaved changes. Are you sure you want to exit?"
                        );
                    }
                });
            });
 $('#table').on( 'edit', 'tbody tr', function () {
            editor.edit( this, {
                submit: 'changed'
            } );
        } );
//for inline edit
        $('#table').on( 'click', 'tbody td.row-edit', function (e) {
            editor.inline(
                table.cells(this.parentNode, '*').nodes(),
                {
                    cancelHtml: '<i class="fa fa-times"></i>',
                    cancelTrigger: 'span.cancel',
                    submitHtml: '<i class="fa fa-floppy-o"></i>',
                    submitTrigger: 'span.edit',
                },{
                    submit: 'changed'
                }
            );
        } );
Edited by Allan - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.
This question has an accepted answers - jump to answer
This discussion has been closed.
            
Answers
Sounds like Editor is detected the values as changed. Possibly this is due to a typing issue - for example
5 !== '5'. Editor uses a strict comparison.If you can give me a link to the page showing the issue I can look into it.
Allan
this is more of an intranet website so will not be able to show it, is there any way you can direct me so that I can see where this comparison is happening?
updated the init-param in js directly and it worked, will look for a solution once posted here.
Look for the
comparemethod. This is it's Typescript source:Most fields do not provide their own
comparefunction so search for the source fordeepCompareand that will likely be the function that is being run for the comparison.Allan