-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[9.0.0] Can't block autofill via beforeChange
when using formulas
#8107
Comments
Actually, Enabling the HyperFormula causes that we cannot prevent change the value: const container = document.getElementById('container');
const hot = new Handsontable(container, {
data: [
[1, 999, 3, '=B1*500', '=B1*5'],
[9, 8, 7, '=B2*500', '=B2*5'],
[4, 6, 2, '=B3*500', '=B3*5'],
],
type: 'numeric',
rowHeaders: true,
colHeaders: true,
// formulas: {
// engine: HyperFormula
// },
beforeChange(changes, source) {
changes[0] = null;
}
}); |
The problem seems to be related to the fact that we're hooking up to |
Looks like the problem described in #8107 (comment) was fixed in #8139, I'm changing the title back to the original one related to autofill only. |
beforeChange
when using formulas
@nikersify Isn't it fixed in #8129? |
|
@wojciechczerniak never mind, I tested the commit (fecc19b) before the one that prepares for hyperformula@1.0 (60594b5) - I don't get an error anymore but this issue is not fixed by those changes. |
Ok. So this is a first good step, we will have data in |
* upgrade hyperformula to 1.1.0 * changelog entry * set `useArrayArithmetic` to `true` * use hf's built-in `doesCellHaveFormula` * remove `attempt` from `getCellType` * Update .changelogs/8502.json Co-authored-by: kirszenbaum <jakub.wisniewski@handsontable.com> * remove `attempt` from `isFormulaCellType` calls * refactor `onBeforeAutofill` Co-Authored-By: jansiegel <jansiegel@users.noreply.github.com> * add a test for #8057 * add a test for #8107 * add changelogs [skip ci] * - Get rid of the 'attempt' helper function - Fix some problems with destroyed HF's instance being called and other minor issues * Remove leftover 'Infinity' mentions. Co-authored-by: kirszenbaum <jakub.wisniewski@handsontable.com> Co-authored-by: jansiegel <jansiegel@users.noreply.github.com> Co-authored-by: Jan Siegel <js.ziggle@gmail.com>
This issue will be fixed by v10 https://jsfiddle.net/9h0soLvu/. |
Issue closed as fixed in v10 |
Description
We are not able to block autofill when formulas are defined.
The issue should be fixed after handsontable/hyperformula#678
The issue does not occur when
Steps to reproduce
A1
toA2
Result in v8.4.0 and v9 without formulas
Cell
A2
does not change its value - we still have2017
in the cell.Result in v9 with formulas enabled
Cell
A2
changes its value - we have2016
in the cell.Demo
https://jsfiddle.net/xc5gqLn1/4/
Your environment
Test Zen 26993 after fix
The text was updated successfully, but these errors were encountered: