-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Header Entry not clickable in RadListView grouping function #973
Comments
Duplicate of #895 |
@tsonevn this is not a duplicate of #895. That issue is about toggling visibility--this is not about that at all. This is about simply being able to catch a click on header entries. I have separately asked about accordion style lists here, but this issue is about an even more basic function--just being able to catch a click on a crucial part of the list. I have seen @NickIliev discuss similar items before, but never this directly. Please do not close this issue without a response. Is it indeed not possible in Nativescript (iOS) to have header entries in a list and to be able to catch when the user clicks on a header entry? |
Hi @tsonevn,
TypeScript
Regarding the issue #895, that I have mentioned in my previous comment. Currently, there is missing functionality for iOS which prevents from implementing togging visibility functionality of the items in the group. Because of that, I marked this issue as duplicated. |
Thank you. I am able to have a working version now. Looks like the key missing pieces are (1) the tkGroupTemplate, and (2) that you have to have to have a separate ng-template that (strangely) appears AFTER the items. (its strange b/c in the code the header piece appears after the list items, but the result is the header appearing above the list items). I was not able to find documentation on tkGroupTemplate. Is it production ready? I also noticed some weird behavior. For example, things seem to work well when I include the |
Thanks, very helpful. In terms of the weird behavior I found: there were two things:
Here's a quick example:
html:
So, no ios:Height item. Result I found: (Country header hides the first city entry):
The formatting would be come buggy--for example, adding large white space in the middle of the screen and having some of the categories overlap. |
@tsonevn while I am grateful to have figured out the click on category headers item, I have found my list to be persistently jerky when scrolling using RadListView. This is using iOS and Angular, and it is especially obvious when testing on my phone. When I take the exact same code+data, but instead of RadListView, I use *ngFor inside , the list functions perfectly and is very smooth scrolling. I have commented on this issue, which discusses that RadListView often turns out to be jerky on scroll. Is it still the case that RadListView has some problems in terms of smooth scrolling? Anything I can do to improve scroll performance? If there is not a way to improve scroll performance, I believe I will have to use *ngFor for my lists instead. |
I have opened up a new issue regarding RLV's lack of smooth scrolling here. |
From @NL33 on December 23, 2018 1:46
Environment
Describe the bug
In a basic two-level list, where there are category headers and entries below, there is not a way to catch a click on the category header (at least in iOS).
There should not be a place on the screen (especially in a basic+common UI like a list) where there is no way to watch (and isolate) a user click event.
For example, take a basic list of countries and cities as follows:
The headers (the countries) should be clickable.
The common way to create such a list in Nativescript is using RadListView's grouping function, described here. However, the grouping function "hides" the group header from html, so there is not a clear way to attach a tap event to it.
Other methods would include to create a two level loop using *ngFor, but *ngFor is reportedly not stable for larger lists. Another method would be to have a two level (ie, nested) listview, but that is also reported to be unstable/non-performant.
To Reproduce
Simple code would be:
html:
ts:
The groupTapped() function here will register a tap on anywhere in the group--it will not tell you if the user has clicked on a category header.
Expected behavior
With a basic list, like as follows:
There should be a way to register if the user taps on a category header (here, a country).
Sample project
N/A
Additional context
There are questions about this issue on stackoverflow here and here.
There is also an issue on github here, as well as the NS slack channel.
There are no answers provided to these, so I'm assuming that currently Nativescript does not provide a method for this basic operation (though I would still be happy if this is incorrect and there is a way, and maybe a pretty simple one!).
Copied from original issue: NativeScript/NativeScript#6734
The text was updated successfully, but these errors were encountered: