focusOnOpenChild property
Sets the focus child so that we can focus on it when the panel opens.
Implementation
@ContentChild('focusOnOpen')
@Input('focusOnOpen')
set focusOnOpenChild(Object? element) {
// TODO: Need further investigation on why ElementRef is received instead of Element
if (element is Focusable) {
_focusOnOpenChild = element;
} else if (element is Element) {
_focusOnOpenChild = RootFocusable(element);
} else if (element is ElementRef) {
_focusOnOpenChild = RootFocusable(element.nativeElement);
} else {
assert(
element == null,
'Warning expansion panel content has a #focus'
'child which is not an Element, or Focusable');
}
}