Hi
I’m to busy to make an example, you have an issue with copy and paste, the paste seems to work but Ive had to put a delay in after changes to allow time for it to complete properly before I update my database backend with out the delay it will only save a proportion of the data, on a save button command. This is annoying and not ideal coding.
Also I have a loading screen that uses the below code to initialise
I use the afterchange with a delay to close the loading screen due to the issue above, but it doesn’t alway open the loading screen straight away, after I have run through the copy and paste sequence at least once.
contextMenu: [ 'copy', 'cut', { key: 'paste', name: 'Paste', disabled: function () { return disable(this, 'Paste'); }, callback: function () { view.LoadingChanged.emit(true); var plugin = this.getPlugin('copyPaste'); this.listen(); plugin.paste(view.clipboardCache); view.SMData = true; this.render(); } }, afterChange: function (changes, source) { // This is not great coding but fixes the bug allowing the copy paste to complete properly. if (source === "CopyPaste.paste" && changes.length > 30) { window.setTimeout(() => { view.LoadingChanged.emit(false); }, 15000); } else if (source === "CopyPaste.paste" && changes.length > 8) { window.setTimeout(() => { view.LoadingChanged.emit(false); }, 7000); } else if (source === "CopyPaste.paste"){ window.setTimeout(() => { view.LoadingChanged.emit(false); }, 3000); }
}