mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
fix(item-group-title): no content required
This commit is contained in:
@ -38,7 +38,7 @@ export class ItemGroupTitle {
|
|||||||
* TODO
|
* TODO
|
||||||
* @param {ElementRef} elementRef TODO
|
* @param {ElementRef} elementRef TODO
|
||||||
*/
|
*/
|
||||||
constructor(elementRef: ElementRef, config: IonicConfig, @Host() content: Content) {
|
constructor(elementRef: ElementRef, config: IonicConfig, @Optional() @Host() content: Content) {
|
||||||
this.isSticky = true;
|
this.isSticky = true;
|
||||||
this.content = content;
|
this.content = content;
|
||||||
this.ele = elementRef.nativeElement;
|
this.ele = elementRef.nativeElement;
|
||||||
@ -46,6 +46,7 @@ export class ItemGroupTitle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onInit() {
|
onInit() {
|
||||||
|
if(!this.content) { return; }
|
||||||
|
|
||||||
this.scrollContent = this.content.elementRef.nativeElement.children[0];
|
this.scrollContent = this.content.elementRef.nativeElement.children[0];
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user