[TIMOB-20358] IOS : Conditional row movement
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Critical |
Status | Closed |
Resolution | Won't Fix |
Resolution Date | 2016-02-08T12:28:15.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | ankur garha |
Assignee | Eric Merriman |
Created | 2016-02-02T19:52:55.000+0000 |
Updated | 2017-03-23T22:29:32.000+0000 |
Description
Hi Team,
This is in context with moveable property available with TableView for iOS platform. Right now if any tableview is having moveable property set to true, then we can the rows around.
And it's always moving the rows, now what if we want to reorder rows if any condition is met.
For example, any tableview is having 2 sections. Now we don't want rows of section2 to be moved into section1.
So there must be way to check for this condition and move the rows back if such a condition is not satisfied
Hello, Please provide the native iOS documentation link to the property. Our engineering team will look through the inquiry and decide whether to implement the function in our platform. The process is time consuming. Thanks.
Hi Sharif, Here you go :- http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.TableView-property-moving It would be really great if you can send some alternates for now, So that I can apply those patches and keep the project going on. Regards, Ankur garha
[~speedyankur@gmail.com] The provided link if our documentation. As far as I know from the official iOS docs (which are asked for), it's part of your application logic to do these checks.
Hi Hans, There is no way to to check for Preconditions, we have only one event (i.e onMove), which is triggered once the row has finished the moving. And it makes no sense to check for conditions here because that row has already moved, then there is no way to put it back. So we need an event where it should check for these preconditions and then only, it should be allowed for moving Or there should be a way to put back that row to its original place if it is failing some conditional logic. I believe
[~speedyankur@gmail.com] You can just set the
canMove
property of every cell to true or false and apply your logic to your ListView. That's all we can do from our point. If you feel like there is another way to do it, you can always contribute to the SDK, since it's open source on [Github](https://github.com/appcelerator/titanium_mobile). Thank you!Closing ticket as Won't Fix with reference to the above comments.