You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that EditableMathField persists the initial mathquill configuration passed on mount.
There are cases where updating the internal configuration could be required. An example of this is when we're defining custom handlers for the editor.
By persisting the initial configuration, if those handlers require access to state variables, those handlers would be using old versions of those handlers, with the old value of those state variables.
Note:
I understand that it is still possible to manually set the configuration by accessing the mathquill object directly, but this new addition could be great for react-mathquill.
Regarding the implementation of it, I noticed mathquill has a method .config(config) that could be used for updating the configuration.
This method could be used on a per-field basis, so there is no need to re-combine the custom edit handler required by react-mathquill.
The text was updated successfully, but these errors were encountered:
I experienced the same issue but with the onMoveOut handler.
I also noticed the issue with the onChange callback with the new version.
You an check here: https://codesandbox.io/s/jovial-sea-wvmfq
Notice that when you change the react-mathquill version to 0.28, it works as expected.
@alx-ppv The problem with onChange us gone in racket-mathquill 1.03.
Using your link: https://codesandbox.io/s/jovial-sea-wvmfq
Changing the version number from 1.0.1 to 1.0.3 everything works as expected.
I noticed that
EditableMathField
persists the initialmathquill
configuration passed on mount.There are cases where updating the internal configuration could be required. An example of this is when we're defining custom handlers for the editor.
By persisting the initial configuration, if those handlers require access to state variables, those handlers would be using old versions of those handlers, with the old value of those state variables.
To illustrate this, I made a simple example: https://codesandbox.io/s/react-mathquill-old-config-persistent-8stef
Note:
I understand that it is still possible to manually set the configuration by accessing the
mathquill
object directly, but this new addition could be great forreact-mathquill
.Regarding the implementation of it, I noticed
mathquill
has a method.config(config)
that could be used for updating the configuration.This method could be used on a per-field basis, so there is no need to re-combine the custom
edit
handler required byreact-mathquill
.The text was updated successfully, but these errors were encountered: