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
Feature/builder #27
Feature/builder #27
Conversation
Added builder factory itself, added itemBuilder property to FieldSuggestion, added docmentation comments and added an example of builder.
Codecov Report
@@ Coverage Diff @@
## develop #27 +/- ##
===========================================
+ Coverage 99.52% 99.55% +0.02%
===========================================
Files 4 4
Lines 211 224 +13
===========================================
+ Hits 210 223 +13
Misses 1 1
Continue to review full report at Codecov.
|
Hey @theiskaa, thanks for the PR. Correct me if I'm wrong but I think this index that are exposed in the builder refers to the index of matchers. So if we have a list of 10 items and find 2 matchs the index will be 0 and 1. Before passing the index to the exposed builder we could do suggestionsList.indexOf(matchers[index]]. |
@g-scosta Hi man, I can't figure out what you exactly mean, can you tell me more about it? |
@theiskaa of course! The index that you are passing to the itemBuilder is the index coming from the itemBuilder inside Inside So if we have a list of 10 items and the last three is in the matchers, the index will be 0-2 and not 7-9. If we do suggestionsList[index] in the itemBuilder we will get the first three values, not the last. The index will always start in 0 and go to the length of the matchers, don't matter where the matcher value is in the original list. EDIT: I realized that we can't do |
@g-scosta Understood, Okay I'll think about that problem, thanks for reporting. |
Yeah, everything is fine now, @g-scosta you can make a review/test and if you are done, then we can merge the PR and close the issue. |
Hey @theiskaa I tested and now it's working, but I noticed a great perfomance issue, I have 500+- items to be filtered and the fps dropped a lot. This is probably due to transforming the list of objects into a list of maps everytime inside itemBuilder. I did some adjustments and tested and with these fixes it's working fast. I'll post these adjustments here: Instead of transforming the list inside itemBuilder I've created a variable
So the part that you assign the indexes variable became
I also noticed that return the ListView it's unecessary, it can return the itemBuilder like that
I'm testing with these fixes and it's on normal perfomance. I think changing that would be enough to release. |
Really perfect detections, thanks again 😄Okay, I'll add them. |
@g-scosta Done! Everything applied/added what you mentioned above. Just check it and if you're ok then we can merge the PR. |
Great! I think it's ready for merge |
Ok, Thank you again for your time and request and for the great idea! |
Resolves: #26
Require to take
suggestionList
,textController
, anditemBuilder
.