mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 15:05:39 +01:00
Playground improvements
This commit is contained in:
parent
20a8d5a651
commit
e3b1a47554
2 changed files with 11 additions and 5 deletions
|
|
@ -140,7 +140,7 @@ export class PlaygroundModel {
|
|||
}
|
||||
}
|
||||
|
||||
private readonly debouncer = new Debouncer(250);
|
||||
private readonly debouncer = new Debouncer(700);
|
||||
|
||||
@observable
|
||||
public isDirty = false;
|
||||
|
|
|
|||
|
|
@ -133,10 +133,16 @@ export class PlaygroundPageContent extends React.Component<
|
|||
checked={
|
||||
model.settings.autoReload
|
||||
}
|
||||
onChange={(e) =>
|
||||
(model.settings.autoReload =
|
||||
e.target.checked)
|
||||
}
|
||||
onChange={(e) => {
|
||||
model.settings.autoReload =
|
||||
e.target.checked;
|
||||
if (
|
||||
e.target.checked &&
|
||||
model.isDirty
|
||||
) {
|
||||
model.reload();
|
||||
}
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
<Button
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue