Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20358] IOS : Conditional row movement

GitHub Issuen/a
TypeNew Feature
PriorityCritical
StatusClosed
ResolutionWon't Fix
Resolution Date2016-02-08T12:28:15.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsn/a
Reporterankur garha
AssigneeEric Merriman
Created2016-02-02T19:52:55.000+0000
Updated2017-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

Comments

  1. Sharif AbuDarda 2016-02-04

    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.
  2. ankur garha 2016-02-04

    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
  3. Hans Knöchel 2016-02-07

    [~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.
  4. ankur garha 2016-02-08

    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
  5. Hans Knöchel 2016-02-08

    [~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!
  6. Lee Morris 2017-03-23

    Closing ticket as Won't Fix with reference to the above comments.

JSON Source