Results 1 to 9 of 9

Thread: Implementing an inverted direction Ext.dataview.List

  1. #1
    Sencha Premium User
    Join Date
    Aug 2015
    Posts
    6

    Default Implementing an inverted direction Ext.dataview.List

    I'm implementing an dataview list in Ext JS 6 modern toolkit, where the start of the list is in the bottom of the screen (I'm developing a chat app so the recent messages must be on the bottom). The only way that I figured out to do this was using the transform CSS rule in the following way:

    - Firstly I rotated the list container 180 degrees, so the start of the list is in the bottom (but the items are now rotated too).
    - Then I rotated each item individually, so the list and the items have now the position that I want.

    The PROBLEM is that the scrolling direction is inverted now, so when I scroll down the list scrolls up and so.

    Is there a way to invert the scrolling direction?? Or is there another way to achieve the effect that I want?? (inverted direction list).

  2. #2
    Sencha User
    Join Date
    Apr 2013
    Posts
    908
    Answers
    105

    Default

    Can't you simply insert the new record at the desired position in your store?
    Also, you can simply sort your store.

  3. #3
    Sencha Premium Member
    Join Date
    Jul 2015
    Posts
    25

    Default

    Quote Originally Posted by hakimio View Post
    Can't you simply insert the new record at the desired position in your store?
    Also, you can simply sort your store.
    You are a retard. don't answer any more.

  4. #4
    Sencha User
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890
    Answers
    41

    Default

    I don't think that response was necessary.

    hakimio is correct.

    Stores auto sort if they are configured with a sorter, so insertions always go to the place they are supposed to go as defined by the store's active Sorters.

    So sort the store by creationTime, DESC and new items will always go to the top.

  5. #5
    Sencha Premium Member
    Join Date
    Jul 2015
    Posts
    25

    Default

    No! he is not correct!
    Posts like this are what causes extjs to be not as good as other solutions.
    We need a list that suits conversations!
    If I wanted to develop this by myself I wouldn't pay you for Extjs.
    So stop avoiding solutions and start working on it!

  6. #6
    Sencha User
    Join Date
    Jan 2016
    Posts
    462
    Answers
    60

    Default

    I have done this before and the solution I used was to scroll down to the bottom of the list each time a new conversation was posted. I think you made this too complex.

  7. #7
    Sencha Premium Member
    Join Date
    Jul 2015
    Posts
    25

    Default

    No, it's not only that.
    First of all, scrolling to the end every time affects performance, especially when there is a lot of data.
    Second, you need the correct timing for scrolling after the store has loaded and displayed otherwize the scrolling will not take place after the data is placed and won't scroll.
    In other words, stop being a smartypants and let's improve the product.

  8. #8
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379
    Answers
    3997

    Default

    I agree with hakimio, Alex and Nige. What I would do is use a store's sort and add a new reply into the store and then scroll to the bottom.



    I don't agree that performance is a concern here though. Testing on an actual device with the above fiddle shows zero slowness for me (of course it's a stand alone example).

    @daviddayag, I'd also like to point out our terms of use which you agreed to when you registered and is in the footer of every page here. The language you have used (especially your first post here) goes against the agreed terms of use and I will ask you to refrain from such language. Even if @hakimio said something that was blatantly wrong doesn't give you the right to speak to him like that. He is under no obligation to reply and does so for free.
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

  9. #9
    Sencha User
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,890
    Answers
    41

    Default

    I'm baffled by the venom here.

    The OP wanted a solution in which new posts are inserted either the beginning or the end.

    Sorting by a time stamp achieves that.

    scrolling to some as yet unspecified position in the view is a completely separate requirement. It can be done if required. You can use a store add listener to use one of several provided APIs to do whatever you please. You can request the view's Scrollable API to scroll to the bottom or the top. Or you can use the view's own scrolling API to scroll any particular record into view.

    daviddayag, what application solution are you asking for in this thread that is not being provided for you?

Similar Threads

  1. How to detect direction being scrolled for List
    By bastard in forum Sencha Touch 2.x: Q&A
    Replies: 2
    Last Post: 4 Nov 2013, 12:50 PM
  2. getting scrolling direction inside a dataview
    By alonlevi in forum Sencha Touch 2.x: Q&A
    Replies: 2
    Last Post: 23 Aug 2013, 2:26 PM
  3. [CLOSED] RC2 List now shows inverted bg color on alternative rows?
    By mike lebowski in forum Sencha Touch 2.x: Bugs
    Replies: 3
    Last Post: 6 Mar 2012, 12:32 AM
  4. Implementing multiple XTemplates for a DataView
    By iaresean in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 7 Sep 2009, 5:25 AM
  5. Can a slider be inverted?
    By mherger in forum Sencha Ext JS Q&A
    Replies: 2
    Last Post: 27 Aug 2008, 12:39 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •