* Remove widget and element state for items no longer present in the * current render tree. Called from setState callbacks where this.state * access is a false positive (the callback runs after the update is * committed). Converting App to a functional component would let us * use useEff
()
| 1694 | * use useEffect and remove this suppress entirely. |
| 1695 | */ |
| 1696 | private removeInactiveWidgetState(): void { |
| 1697 | const { elements, blockIds } = this.state.elements.getActiveIds() |
| 1698 | const activeIds = new Set([ |
| 1699 | ...Array.from(elements) |
| 1700 | .map(element => getElementId(element)) |
| 1701 | .filter(notUndefined), |
| 1702 | ...blockIds, |
| 1703 | ]) |
| 1704 | this.widgetMgr.removeInactive(activeIds) |
| 1705 | } |
| 1706 | |
| 1707 | /** |
| 1708 | * Opens a dialog with the specified state. |
no test coverage detected