Skip to content
This repository was archived by the owner on May 20, 2023. It is now read-only.

Commit 3ef81f2

Browse files
TedSandernshahan
authored andcommitted
Allow material_dropdown components to contain an auto_focus directive
Improve a11y example to have better accessibility PiperOrigin-RevId: 219876200
1 parent c06ab12 commit 3ef81f2

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

angular_components/lib/mixins/material_dropdown_base.dart

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import 'dart:async';
77
import 'package:angular/angular.dart';
88
import 'package:angular_components/content/deferred_content_aware.dart';
99
import 'package:angular_components/laminate/enums/alignment.dart';
10+
import 'package:angular_components/laminate/popup/popup.dart';
1011

1112
/// A simple handle for Dropdown components.
1213
/// Components wishing to control an ancestral dropdown can have this interface
@@ -34,7 +35,8 @@ abstract class DropdownHandle {
3435
/// - `DropdownHandle` -- Provides a common interface to open/close dropodowns.
3536
/// - `DeferredContentAware` -- Provides a means to lazily create/attach
3637
/// content.
37-
class MaterialDropdownBase implements DropdownHandle, DeferredContentAware {
38+
class MaterialDropdownBase
39+
implements DropdownHandle, DeferredContentAware, PopupRef {
3840
/// Fired when the dropdown's visibility changes.
3941
@Output('visibleChange')
4042
Stream<bool> get visibleStream => _visibleStream.stream;
@@ -105,4 +107,10 @@ class MaterialDropdownBase implements DropdownHandle, DeferredContentAware {
105107

106108
@override
107109
Stream<bool> get contentVisible => _contentVisible.stream;
110+
111+
@override
112+
bool get isVisible => visible;
113+
114+
@override
115+
Stream<bool> get onVisibleChanged => visibleStream;
108116
}

0 commit comments

Comments
 (0)