1 | export declare type MdUniqueSelectionDispatcherListener = (id: string, name: string) => void;
|
2 | /**
|
3 | * Class to coordinate unique selection based on name.
|
4 | * Intended to be consumed as an Angular service.
|
5 | * This service is needed because native radio change events are only fired on the item currently
|
6 | * being selected, and we still need to uncheck the previous selection.
|
7 | *
|
8 | * This service does not *store* any IDs and names because they may change at any time, so it is
|
9 | * less error-prone if they are simply passed through when the events occur.
|
10 | */
|
11 | export declare class MdUniqueSelectionDispatcher {
|
12 | private _listeners;
|
13 | /** Notify other items that selection for the given name has been set. */
|
14 | notify(id: string, name: string): void;
|
15 | /** Listen for future changes to item selection. */
|
16 | listen(listener: MdUniqueSelectionDispatcherListener): void;
|
17 | }
|