How to restrict can swipe feature on single row at a time

Hi Everyone,

i have implemented swipe functionality on the row of list.currently when i am swiping from right to left than that list will show some option buttons.

Right now in that list each row is showing same behavior while swiping at the same time, but i want that at a time only single row will display that icons. if one row is already showing that option button than on swiping another row only that row will display option buttons and rest of the rows will get closed.

can anyone please tell me how i have to manage this feature.

Thanks in advance

You could do something like this.

1 Like

hey @mhartington thanks for your response but this codepen example is for latest ionic beta 6 but i am working on ionic framework version 0.9.24 so i need to implement in that so any help.

<list can-swipe="true" option-buttons="optionButtons1" >

      <!-- shows that the item directive does not need attributes and can get values from the list attributes -->
      <item   ng-repeat="item in items" 
            item="item">
        <i class="icon ion-chatbox"></i>
        Repeat Item: {{ item.text }}
      </item>
	  </list>

so above one is the code which i am using to display the option buttons on swipe but as soon as i swipe on each item it will keep showing. & i want it to show only one at a time.

Thanks!

Oh man, 0.9.24? That seems like forever ago. Not too sure if they api had these features built in yet.

I’d really advise upgrading to the newer releases. It’s going to work out for you in the long run.

Hi @mhartington / @freemain3 , the codepen which you have posted on 5th jun for swipe feature is not working on Chrome but properly working in safari. Is there any limitation of swipe feature? Is it browser specific? I want to run this in chrome also. Please suggest.