Add option to disable format copying on autofill (dragging to expand values)
Hi! š First of all, thank you for the awesome work on this project!
Iād like to suggest a small improvement: When dragging a cell to expand it to other cells (like filling down or right), the formatting is also copied. In some cases, this might not be desirable. For example, if the original cell is read-only, the destination cells also become read-only.
Would it be possible to add aN option to disable copying formatting during this action? This way, only the values would be copied (similar to how it works when using keyboard copy-paste between cells).
Maybe a option on the sheet that can be read by DefaultAutofillPattern? https://github.com/anmcgrath/BlazorDatasheet/blob/main/src/BlazorDatasheet.Core/Patterns/DefaultAutofillPattern.cs#L22
Should I create an PR for this?
Thanks again for the great work! š
Hey @jonas-engberg-matsmart-se thanks for the suggestion. I agree that you should have some control over the autofill.
I agree the default auto-fill pattern is how we would fix this, although after looking into this I'm not 100% happy with how this works - if you try the autofill with two numbers selected it won't copy formatting which is inconsistent.
If you're happy to create a PR I'm happy for you do to so, otherwise I can look at it.
Yes, I agree to your comment that using a before event to change the behavior is better. See PR.