Skip to content

bug: Accessing an IonList's children property always results in an empty collection #6367

@ErikOnBike

Description

@ErikOnBike

Prerequisites

Stencil Version

v4.36.1

Current Behavior

When an <ion-list> element is asked for its children, an empty collection is answered (in all situations). The internal property __children correctly recognises the children present.

Expected Behavior

The actual children (as present in the property __children) should be answered.

System Info

Steps to Reproduce

  • Go to IonList page of the Ionic components: https://ionicframework.com/docs/api/list
  • Open dev console
  • Enter: document.body.querySelector("ion-list").children
  • Result: empty collection
  • Enter document.body.querySelector("ion-list").__children
  • Result: non-empty collection

Code Reproduction URL

(see reproduction steps above)

Additional Information

I think the recent updates wrt patching components (#6349) incorrectly concludes that the IonList element has slots. The IonList has a render function on some template, but it does not contain an explicit slot element.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug: ValidatedThis PR or Issue is verified to be a bug within StencilHelp Wanted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions