How to Block the screen when copy and paste the data using Reactjs

Tags: #<Tag:0x00007fd2c1e56960>

Dear Team,

Is there way to Block and unblock the screen when copy and past is in-progress. We have tried with Before Paste and After Paste but It did not worked. Please help us is there a way.We are using ReactJs


Welcome @rohit.parwal

we do not have a predefined option like that. I have a preloader demo,js,output but it lacks the logic of before/afterPaste.

Thanks for quick reply. Is there a demo with Reactjs? actually the issue is we are using the setState methods.when this.setState() called in afterPaste method we are losing the instance of Handsontable. Could you let us know is there any other way to implement this with ReactJs.
render() {
if (!this.state.isLoaded) {
return ();
} else { – Display page}

-- Code in paste method

     beforePaste :function (data, coords){
                        isLoaded: false
                afterPaste :function (data, coords){
                        isLoaded: true

Appreciate your help!

Have you considered using a layer? Here’s an example with a layer using React

Thanks @aleksandra_budnik. This is helpful somewhat but when i am dealing with large the hidden visibility coming late. For example I have pasted 3000 records in example grid( it did not show anything but hidden visibility came after some time. Please let us know is there any other way we can achieve this.
Appreciate your help!

You may want to replace the beforePaste hook with afterDocumentKeyDown or even beforeKeyDown as it looks like the afterPaste is the last hook to be called on that action

Still not a 100% solution but it solved some what.I have used blockUI to show loading…

That project looks promising. Glad to hear that it works well.