Gantt ยท console.warn
gantt: setState was asked to show a view but no container is known yet; call mount()/mountSplit() at least once first.
Printed by Gantt, prefixed [lattice], since 1.50.0.
Warnings reference › gantt-state-no-container
- Identifier
gantt-state-no-container- Raised by
- Gantt
- Since
- 1.50.0
What happened
The state being restored says a view was mounted, and this controller has never been given an element to draw into, so there is nowhere to put it. The rest of the state is not applied either - the call returns straight away - and nothing is rendered.
The fix
Mount the plan once before restoring state; the controller then remembers the container and setState can re-show the right view.
The smallest fix
gantt.mountSplit(el);
gantt.setState(saved);
Reference
Covered in full at the API reference.