MCPcopy Create free account
hub / github.com/angular/components / close

Method close

src/material/select/testing/select-harness.ts:151–158  ·  view source on GitHub ↗

Closes the select's panel.

()

Source from the content-addressed store, hash-verified

149
150 /** Closes the select's panel. */
151 async close(): Promise<void> {
152 if (await this.isOpen()) {
153 // This is the most consistent way that works both in both single and multi-select modes,
154 // but it assumes that only one overlay is open at a time. We should be able to make it
155 // a bit more precise after #16645 where we can dispatch an ESCAPE press to the host instead.
156 return (await this._backdrop()).click();
157 }
158 }
159
160 /** Gets the selector that should be used to find this select's panel. */
161 private async _getPanelSelector(): Promise<string> {

Callers 1

Calls 2

isOpenMethod · 0.95
clickMethod · 0.65

Tested by

no test coverage detected