forked from MapComplete/MapComplete
Make question generation laze, huge performance boost
This commit is contained in:
parent
8b870474d7
commit
4c2beb5334
2 changed files with 19 additions and 2 deletions
|
@ -9,6 +9,7 @@ import Toggle from "../Input/Toggle";
|
|||
import BaseUIElement from "../BaseUIElement";
|
||||
import TagRenderingConfig from "../../Models/ThemeConfig/TagRenderingConfig";
|
||||
import {Unit} from "../../Models/Unit";
|
||||
import Lazy from "../Base/Lazy";
|
||||
|
||||
export default class EditableTagRendering extends Toggle {
|
||||
|
||||
|
@ -44,14 +45,14 @@ export default class EditableTagRendering extends Toggle {
|
|||
editMode.setData(false)
|
||||
});
|
||||
|
||||
const question = new TagRenderingQuestion(tags, configuration,
|
||||
const question = new Lazy(() => new TagRenderingQuestion(tags, configuration,
|
||||
{
|
||||
units: units,
|
||||
cancelButton: cancelbutton,
|
||||
afterSave: () => {
|
||||
editMode.setData(false)
|
||||
}
|
||||
})
|
||||
}))
|
||||
|
||||
|
||||
rendering = new Toggle(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue