triniwiz / nativescript-accordion

Apache License 2.0
38 stars 14 forks source link

How to avoid using 'items' property #76

Open KirilOkun opened 5 years ago

KirilOkun commented 5 years ago

Make sure to check the demo app(s) for sample usage

Make sure to check the existing issues in this repository

If the demo apps cannot help and there is no issue for The instructions state

"By default the plugin will look for the items property in each item but you can set name by setting childItems="blah" on the Accordion instance"

I'm not clear why this is necessary and would like to avoid having this extra property. I got an array containing objects that need to be displayed with the accordion. All properties are on the same level within that object like so:

[ { "property1: "blah", "property2": "yada" } ]

Passing this array to accordion i'd like to be able to specify properties for header, data, and footer from the same level instead of creating an items property.
What's the best way to do this?

Which platform(s) does your issue occur on?

Please, provide the following version numbers that your issue occurs with:

Please, tell us how to recreate the issue in as much detail as possible.

Describe the steps to reproduce it.

Is there any code involved?