Closed MartinDawson closed 3 years ago
Calling method on an instance that is destroyed should not be possible:
hf.destroy();
console.log(hf.getAllFunctionPlugins());
So this is a bug IMO.
The second part with
HyperFormula.registerFunctionPlugin(CountHF, countHFTranslations);
HyperFormula.unregisterFunctionPlugin(CountHF);
we will have to investigate. AFAIK plugin should be removed globally 🤔 Thanks for reporting.
The second part with
HyperFormula.registerFunctionPlugin(CountHF, countHFTranslations); HyperFormula.unregisterFunctionPlugin(CountHF);
we will have to investigate. AFAIK plugin should be removed globally 🤔 Thanks for reporting.
AFAIR it's not a bug. Look at this code:
HyperFormula.unregisterAllFunctions()
HyperFormula.registerFunctionPlugin(FooPlugin)
const engine = HyperFormula.buildEmpty()
HyperFormula.unregisterFunctionPlugin(FooPlugin)
console.log(engine.getAllFunctionPlugins())
engine
was created when registered statically plugins contained FooPlugin
. Removing it statically
did not affect after engine
was created. So the output is [FooPlugin]
.
Do you see a way around it? For me it's working as designed.
Done in #788
Description
The above functions should all remove hyperformula instance registered custom plugins.
Steps to reproduce
Demo
https://codesandbox.io/s/github/handsontable/hyperformula-demos/tree/0.6.x/vanillajs-demo?from-embed=&file=/src/hyperformulaConfig.js
Your environment
I ran into this issue when testing this PR: https://github.com/handsontable/hyperformula/pull/766
Thanks.