Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Callback for custom drag down autofill #200

Closed
Zauberfisch opened this issue Oct 20, 2012 · 6 comments
Closed

Callback for custom drag down autofill #200

Zauberfisch opened this issue Oct 20, 2012 · 6 comments

Comments

@Zauberfisch
Copy link

when you have the cols 11, 12, 13 the autofill will repeat the pattern to 11, 12, 13, 11, 12, 13

it would be nice to be able to hand a callback to the table that overwrites the basic repeat behaviour

@mike-aungsan
Copy link

I have more or less the same issue with autofill.

I need to calculate new value and it only called onBeforeChange once and it call onChange, many times = the number of drag cell.

What I was doing is when cell value are update, total value is updated automatically by using change.push on onChange method. Since onBeforeChange method is called only once, I cannot get a way to update new value.

I tried to update cell value from onChange value, but it does not work and fall into infinite loop.

This was referenced Feb 21, 2013
@warpech
Copy link
Member

warpech commented May 7, 2013

Thanks for your patience guys!

Handsontable 0.9.0-beta1 adds new callbacks beforeAutofill that can be used for this purpose. You are welcome to test it. Until it is merged with master branch, you will need to checkout 0.9 branch

More about new Events.

I will close this ticket when branch 0.9 is merged with master. Thanks again!

@warpech
Copy link
Member

warpech commented May 21, 2013

Handsontable 0.9.0 now features the beforeAutofill callback.

More about new events here: https://github.com/warpech/jquery-handsontable/wiki/Events

@warpech warpech closed this as completed May 21, 2013
@felixhagspiel
Copy link

@warpech sorry for replying on this again, but I dont understand how that event gives us the ability to change the behaviour of the autofill. As I understand the 'beforeAutofill' callback gives us only information about the cells and the pattern, but it does not give us the ability to change it. Neither can we stop the autofill. So what we have to do is to read the pattern, then wait until the cells are filled by autofill, and then overwrite them manually. Is there a better way, i.e. returning a callback with the new values for the cells? Or am I overseeing something? Sorry if so :)

@sasuke37
Copy link

hi ,
i have a problem with the autofill :

sans titre

Anyone have a solution for my problem??

(i work the last free version)

@AMBudnik
Copy link
Contributor

Hi @sasuke37 you're using ngHandsontable and formulas? (as I can see in your console)
Can you share a demo where this issue is replicable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants