ionic-modal-select icon indicating copy to clipboard operation
ionic-modal-select copied to clipboard

Multiple buttons each associated with a modal

Open senthil-asdra opened this issue 8 years ago • 1 comments

Hi, Thanks for the nice plugin.. I'm trying to use it to show a modal on click of a button. The page has multiple rows and columns of buttons. The issue is, the page hangs for sometime after all the buttons show up. And then it works as expected. Is there a way to optimize or remove this initial freeze? Or is it possible to use a single modal for all the buttons? Any help is appreciated. The view markup is as below,

<ul class="h-list" ng-repeat="row in rows" style="clear:both;width:{{cols.length  * 54}}px;">
                <li ng-repeat="col in cols">
                    <div class="seat" 
                         ng-repeat="seat in seatlayout| filter: {SeatRow: row.toString(), SeatColumn: col.toString()} : true">
                        <button 
                             ng-if="getSeatStatusClass(seat) === 'seat_free'"
                             class="seat"
                             ng-class="getSeatStatusClass(seat)"
                             ng-click="toggleSeat(seat)"
                             modal-select=""
                             ng-model="selTicketType[seat.Id]" options= "tickettypes" 
                             modal-title="Select Ticket Type" on-select="buildSelectedSeats(newValue)" >
                            {{seat.SeatNo}}
                            <div class="option">
                                {{option.TicketTypeName}} - {{option.TotalTicketPrice}}
                            </div>
                        </button>
                        <button 
                                ng-if="getSeatStatusClass(seat) !== 'seat_free'"
                                class="seat"
                                ng-class="getSeatStatusClass(seat)"
                                ng-click="toggleSeat(seat)">
                            {{seat.SeatNo}}
                        </button>

                        <button ng-show="seatlayout.length==0" class="seat">&nbsp;</button>
                    </div>
                </li>
            </ul>

senthil-asdra avatar Mar 27 '16 17:03 senthil-asdra

hi @senthil-asdra , which version of the plugin are you using? Could you make an example (a codepen or something alike) where I can see the issue?

bianchimro avatar Mar 27 '16 18:03 bianchimro