MCPcopy Index your code
hub / github.com/angular/components / _selectValue

Method _selectValue

src/material/timepicker/timepicker.ts:321–334  ·  view source on GitHub ↗

Selects a specific time value.

(option: MatOption<D>)

Source from the content-addressed store, hash-verified

319
320 /** Selects a specific time value. */
321 protected _selectValue(option: MatOption<D>) {
322 this.close();
323 this._keyManager.setActiveItem(option);
324 this._options().forEach(current => {
325 // This is primarily here so we don't show two selected options while animating away.
326 if (current !== option) {
327 current.deselect(false);
328 }
329 });
330 // Notify the input first so it can sync up the form control before emitting to `selected`.
331 this._input()?.timepickerValueAssigned(option.value);
332 this.selected.emit({value: option.value, source: this});
333 this._input()?.focus();
334 }
335
336 /** Gets the value of the `aria-labelledby` attribute. */
337 protected _getAriaLabelledby(): string | null {

Callers 1

_handleKeydownMethod · 0.95

Calls 5

closeMethod · 0.95
deselectMethod · 0.65
focusMethod · 0.65
setActiveItemMethod · 0.45

Tested by

no test coverage detected