Not work more filter of nativescript-filter-select on one page


#1

Hi, I use this plugin https://github.com/moayadnajd/nativescript-filter-select for multi select.
I would like have two component on one page. I add Filter select twice (code is bellow). But on page is rendered only first FilterSelect for age. How to achieve to have two FilterSelect rendered?

<StackLayout >
    <FilterSelect
            height="100%"
            [items]="ages"
            (change)="onSelectedAge($event)"
            hint="age"
            modal_title="age" search_param="name"
            primary_key="id"
            multiple="false"
            allowSearch="false">
    </FilterSelect>
  </StackLayout>
  <StackLayout>
    <FilterSelect
            height="100%"
            [items]="days"
            (change)="onSelectedDays($event)"
            hint="day"
            modal_title="dayk" search_param="name"
            primary_key="id"
            multiple="true"
            allowSearch="false">
    </FilterSelect>
</StackLayout>

EDIT:
But is not render neither button after this FilterSelect

thanks


#2

Can you paste your entire layout? If this is all what you have inside a page / html it definitely won’t work as Page is extended from ContentView which can hold only one child element at a time.


#3

yea its part of template I send whole

<StackLayout>
   <StackLayout>
    <FilterSelect
            height="100%"
            [items]="ages"
            (change)="onSelectedAge($event)"
            hint="age"
            modal_title="age" search_param="name"
            primary_key="id"
            multiple="false"
            allowSearch="false">
    </FilterSelect>
  </StackLayout>

  <StackLayout>
    <FilterSelect
            height="100%"
            [items]="days"
            (change)="onSelectedDays($event)"
            hint="day"
            modal_title="day" search_param="name"
            primary_key="id"
            multiple="true"
            allowSearch="false">
    </FilterSelect>
  </StackLayout>

  <Button class="btn btn-primary btn-active" id="button" text="search" (tap)="onSearch($event)"></Button>

</StackLayout>


#4

Come on man you are setting height to 100% then how do you expect rest of elements to be visible on the screen. Besides I think the extra stack layouts those wrapping FilterSelect, it is not even required.


#5

Ou yea. You are right it was copy from example and didnt happen it me.
Thanks