Clear highlights when changing the text.

I'm not a big fan of this behavior but we need some form of clearing and this is the simplest right now.
This commit is contained in:
Tom Alexander 2024-01-27 15:29:37 -05:00
parent 1c8f84ab4c
commit b8eacd9c79
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -24,6 +24,7 @@ In the AST on the right, you can:
function Editor({ defaultValue = default_org_source }) {
function handleChange(event: React.ChangeEvent<HTMLTextAreaElement>) {
setValue(event.target.value);
clearHighlights();
}
const [value, setValue] = useState(defaultValue);