Skip to content

Expose itemIdGenerator that can be used to generate unique ID for items on ListView#4964

Merged
hshristov merged 2 commits intoNativeScript:masterfrom
buuhuu:bugfix/4962-expose-id-generator-function-for-listview
Dec 5, 2017
Merged

Expose itemIdGenerator that can be used to generate unique ID for items on ListView#4964
hshristov merged 2 commits intoNativeScript:masterfrom
buuhuu:bugfix/4962-expose-id-generator-function-for-listview

Conversation

@buuhuu
Copy link
Copy Markdown
Contributor

@buuhuu buuhuu commented Oct 18, 2017

Following the principle of the itemTemplateSelector, I added an itemIdGenerator function that defaults to simply returning the index of the item (this is the current behaviour of the Adapter implementation for android).

Users can set the itemIdGenerator to return any number as unique id for the given item (index and items). In my project I use a hash function to generate that number from a unique string property.

#4729 #4962 #4724

@ghost ghost added the ♥ community PR label Oct 18, 2017
@NativeScript NativeScript deleted a comment from ns-bot Oct 19, 2017
@NativeScript NativeScript deleted a comment from ns-bot Oct 19, 2017
@NativeScript NativeScript deleted a comment from ns-bot Oct 19, 2017
@NativeScript NativeScript deleted a comment from ns-bot Oct 19, 2017
@NativeScript NativeScript deleted a comment from ns-bot Oct 19, 2017
@NativeScript NativeScript deleted a comment from ns-bot Oct 19, 2017
@NativeScript NativeScript deleted a comment from ns-bot Oct 19, 2017
@NativeScript NativeScript deleted a comment from ns-bot Oct 19, 2017
@NativeScript NativeScript deleted a comment from ns-bot Oct 19, 2017
@NativeScript NativeScript deleted a comment from ns-bot Oct 19, 2017
@NativeScript NativeScript deleted a comment from ns-bot Oct 19, 2017
@NativeScript NativeScript deleted a comment from ns-bot Oct 19, 2017
@NativeScript NativeScript deleted a comment from ns-bot Oct 19, 2017
@NativeScript NativeScript deleted a comment from ns-bot Oct 19, 2017
@buuhuu
Copy link
Copy Markdown
Contributor Author

buuhuu commented Oct 30, 2017

Can anyone review that change?

@ns-bot
Copy link
Copy Markdown

ns-bot commented Oct 30, 2017

Can one of the admins verify this patch?

9 similar comments
@ns-bot
Copy link
Copy Markdown

ns-bot commented Oct 30, 2017

Can one of the admins verify this patch?

@ns-bot
Copy link
Copy Markdown

ns-bot commented Oct 30, 2017

Can one of the admins verify this patch?

@ns-bot
Copy link
Copy Markdown

ns-bot commented Oct 30, 2017

Can one of the admins verify this patch?

@ns-bot
Copy link
Copy Markdown

ns-bot commented Oct 30, 2017

Can one of the admins verify this patch?

@ns-bot
Copy link
Copy Markdown

ns-bot commented Oct 30, 2017

Can one of the admins verify this patch?

@ns-bot
Copy link
Copy Markdown

ns-bot commented Oct 30, 2017

Can one of the admins verify this patch?

@ns-bot
Copy link
Copy Markdown

ns-bot commented Oct 30, 2017

Can one of the admins verify this patch?

@ns-bot
Copy link
Copy Markdown

ns-bot commented Oct 30, 2017

Can one of the admins verify this patch?

@ns-bot
Copy link
Copy Markdown

ns-bot commented Oct 30, 2017

Can one of the admins verify this patch?

@SvetoslavTsenov
Copy link
Copy Markdown
Contributor

Hey @buuhuu, thank you for contribution, we are about to run some tests and will write you back soon.

@SvetoslavTsenov
Copy link
Copy Markdown
Contributor

run ci

@SvetoslavTsenov
Copy link
Copy Markdown
Contributor

run uitests

@buuhuu
Copy link
Copy Markdown
Contributor Author

buuhuu commented Dec 4, 2017

I don't see the details of the test failures. Any insights?

@SvetoslavTsenov
Copy link
Copy Markdown
Contributor

Hey @buuhuu, all tests are all right so far, thank you for your contribution. We will review this item soon and write you back.

@hshristov hshristov merged commit 4bcb984 into NativeScript:master Dec 5, 2017
@buuhuu buuhuu deleted the bugfix/4962-expose-id-generator-function-for-listview branch December 5, 2017 10:57
@lock
Copy link
Copy Markdown

lock bot commented Aug 26, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Aug 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants