tipstrade / ionic-fancy-select

A Fancy Select for Ionic Framework
27 stars 19 forks source link

Unable to use multiple fancy select in a template #11

Open adeelzx opened 8 years ago

adeelzx commented 8 years ago

I am unable to use multiple select in a same template. While changing value for one, its affecting another one also.

nickbar06 commented 8 years ago

Did you fix this problem? And if you did, how so?

nickbar06 commented 8 years ago

For @adeelzx or for anyone that thinks it's not possible!

Actually just solved it, I created different directives for every select that i needed, inside the directive, i changed the scope.text variable to different variations

for example:

Responsible department directive had scope.textResponsible Originating department directive had scope.textOrigin then i created different fancy-select.html pages that bring in it's respective text variable

<ion-list >
    <ion-item class="item-text-wrap" ng-click="showItems($event)" style='min-height: 50px;' >
    {{textOrigin}}<span class="ion-chevron-right" style="float:right"></span>
    </ion-item>
</ion-list>

inside the view i had textOrigin as an option

<originating-dept-select ng-model="oDepts" header-text="Originating Departments" allow-empty='false' value="val.multiple" textOrigin="responsibleDeptlbl" items="originatingDepts" multi-select="true">

</originating-dept-select>