bubble edit on specific field as override for inline

bubble edit on specific field as override for inline

finsight-akfinsight-ak Posts: 19Questions: 5Answers: 0

I am using the keys option to bind the editor instance to the datatable. I am looking for documentation & example for the proper event & handling to inject a bubble editor instead of the inline for a specific field

 keys: {
                    editor: editor
                },

This does popup the bubble on the proper field, but the edit happens in the inline form, and if submitted the bubble will not close.

    editTable.on('key', function (e, datatable, key, cell, originalEvent) {
                if (key === 13 && cell.index().column === 15) {
                    editor.close();
                    editor.bubble(cell.node(), 'Comments', {
                            submitOnBlur: true
                            }
                        );
                }
            });

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Answer ✓

    Hi,

    The keys.editor option will always use inline() (unless you modify the library's code, which you can of course do). If you wanted to use bubble() you would need to listen for the key event from KeyTable and decide what action to take, rather than using the keys.editor option.

    You might find the function that KeyTable uses to trigger inline editing useful to help get started in this regard.

    Regards,
    Allan

  • finsight-akfinsight-ak Posts: 19Questions: 5Answers: 0

    Got it! Your suggestion is spot on--thanks again!

This discussion has been closed.