Autofill with copyable:false

Hi all,

I’m asking myself if copyable:false should also be applied for Autofill actions?

I’m quite sure, that currently Autofill copies cells even if copyable is set to false.
From my point of view this should be changed, because Autofill is just another method for copying cells.

Hi @johnny.petersen

I think that it may be a very similar case as copying but we usually allow users to decide. You can block the action if it is an autofill via beforeChange callback like here http://jsfiddle.net/0dm9u48v/

That’s exactly what I’m doing and it doesn’t bother me, but just for consistency reasons… anyway, not a real problem.

Sure, I have asked myself the same question when I saw your topic. I think that it definitely wouldn’t be wrong to change it, however, as no one has reported that we are doing it wrong now we should keep the default behavior as it is.

Thank you for sharing your thoughts. We may get back to the subject one day.

By the way, is there anywhere a description of the hooks “firing” order and the transformation of the data?
E.g. right now I’m searching the place in-between “beforePaste” and “beforeChange” where the
data of readonly columns gets removed.

And another question please (which doesn’t belong to this topic). Are you aware of any bug which could be responsible, that the
first column of my table is not readonly, even if it is configured correctly with readOnly:true?
It works for all columns
in my table, except the first one :frowning:

Thanks a lot for your support …

Hi @johnny.petersen

the readOnly bug sounds really odd. I do not remember any similar bug but I’d be happy to examine any demo you may send.

When it comes to callbacks here https://docs.handsontable.com/pro/1.11.0/tutorial-using-callbacks.html is a great tutorial which allows you to check when a callback is called and what it returns. I just recommend switching off mouse over/out events as they send a lot of spam to the console.

Hi,

I’m still struggling with copy-paste.

I build a test case here: http://jsfiddle.net/ccrider/3jqf0pmf/

The example contains 10 columns. Every second column is hidden and contains a key from the database.
In the middle there is one readonly column.

If I now paste some excel content to this table, I miss one column in the beforeChange hook.
I think the number of missing columns corresponds to the number of readonly cells (but I didn’t try that).

Of course the copy result looks a bit weird, because some content goes to the hidden cols. But the real problem is
the missing last column value.

Is that a bug or is there any other explanation?

Another one is here: https://jsfiddle.net/ccrider/y6r0e8km/76/
Why is that beforeCopy piece of code not firing/running?

At the first glance, it looks like a bug to me. I have sent the demo to our developer who is currently doing a refactor for copy-paste plugin.

I will share his feedback as soon as I’ll get it.

Thanks for your response. Do you think the second fiddle is also a bug, or am I missing something?
The beforeCopy hook
is never called…

Hi @johnny.petersen

I think that it may be related to the first issue. As you can see on a simpler demo http://jsfiddle.net/ojjou863/ it runs after we use CTRL/CMD + Z

ps. we’d be able to test it next week when we’ll push new refactored copy-paste plugin.

Thanks, I’ll wait till next week …

Hi Aleksandra, If you deploy a new version of the copy paste plugin, where can I find that new version?
Is this the right place: https://github.com/handsontable/handsontable/tree/master/src/plugins/copyPaste

Hi @johnny.petersen

tomorrow is an official release. There is no PRO code on any of our repositories and but the CE version is on the developer branch.

Hi, in which Pro Version ca I find the new CopyPaste implementation?

Hi @johnny.petersen

we have released the newest copyPaste plugin in v1.12.0
Here are the release notes: https://docs.handsontable.com/pro/1.12.0/tutorial-release-notes.html
Please remember that it provides some breaking changes.

1 Like