Update latex preview during parameter autocomplete

This commit is contained in:
Jan Böhmer 2022-09-07 21:57:30 +02:00
parent 5adeddfb0d
commit 05e2530924

View file

@ -19,9 +19,13 @@ export default class extends Controller
if (this.symbolTarget && symbol !== undefined) { if (this.symbolTarget && symbol !== undefined) {
this.symbolTarget.value = symbol; this.symbolTarget.value = symbol;
//Trigger input event to update the preview
this.symbolTarget.dispatchEvent(new Event('input'));
} }
if (this.unitTarget && unit !== undefined) { if (this.unitTarget && unit !== undefined) {
this.unitTarget.value = unit; this.unitTarget.value = unit;
//Trigger input event to update the preview
this.unitTarget.dispatchEvent(new Event('input'));
} }
} }