MCPcopy
hub / github.com/streamlit/streamlit / removeInactive

Method removeInactive

frontend/lib/src/WidgetStateManager.ts:170–176  ·  view source on GitHub ↗

Remove the state of widgets that are not contained in `activeIds`.

(activeIds: Set<string>)

Source from the content-addressed store, hash-verified

168
169 /** Remove the state of widgets that are not contained in `activeIds`. */
170 public removeInactive(activeIds: Set<string>): void {
171 this.widgetStates.forEach((_value, key) => {
172 if (!activeIds.has(key)) {
173 this.widgetStates.delete(key)
174 }
175 })
176 }
177
178 /** Remove all widget states. */
179 public clear(): void {

Callers 3

removeInactiveMethod · 0.45

Calls 2

forEachMethod · 0.80
deleteMethod · 0.45

Tested by

no test coverage detected