Issue while using nativescript accordian

nativescriptcore

#1

Hi All,

I am facing issue while creating according in list with nativescript vue. Following is the code. Please suggest.

    <accordion:Accordion.itemTemplate>
      <StackLayout headerText="First">
        <Label text="{{OutletName}}"/>
        <Label text="{{CompanyName}}"/>
      </StackLayout>
    </accordion:Accordion.itemTemplate>


    <accordion:Accordion.footerTemplate>
      <GridLayout backgroundColor="yellow" columns="auto,*">
        <Label text="{{footer}}"/>
        <Label col="1" text="-"/>
      </GridLayout>
    </accordion:Accordion.footerTemplate>

  </accordion:Accordion>
</StackLayout>
.mytxt { color:black !important; }

Thanks,
Ravi Sharma


#2

Whenever posting a issue try to explain what exactly the problem is as detail as possible.

Looking at your code, it doesn’t seem Vue related but Core. Checkout the official nativescript-vue plugin docs to understand how to initialise UI plugins.


#3

I tried to implement the code which is described in nativescript-accordian. It is not working. I need to show 2 fields on my data in one row and when we click on accordian icon, rest of the data should be displayed in accordian. I couldn’t find sample that anywhere and syntax is throwing error.


#4

You have to register the UI element before using it as discussed in the docs.