You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yeah that 5 is not very nice. A possible solution would be to add a new variable to SuggestionRow which defines how many rows will be shown in the suggestion table as maybe suggestions.count is too large.
Well you are correct in that the 44 should also be parametrizable.
I believe this problem is best fixed if we add two variables with sensible default values instead of using hardcoded 44 and 5. The variable for the amount of rows would be a maximum like so: height = min(suggestions.count, maxNumberOfRows)
What do you think?
The question that arises then is what if there are no suggestions? Show x empty rows? Showing nothing might not look good.
A possibility would be: height = max(3, min(suggestions.count, maxNumberOfRows))
Activity
mats-claassen commentedon Oct 27, 2016
Yeah that
5is not very nice. A possible solution would be to add a new variable toSuggestionRowwhich defines how many rows will be shown in the suggestion table as maybesuggestions.countis too large.VivienGiraud commentedon Oct 27, 2016
TBH
suggestions.countworks great, I'm just looking to replace that44:)VivienGiraud commentedon Oct 27, 2016
I understand what you meant by "is too large", then you can do the "Quick & Dirty AF" version:
mats-claassen commentedon Oct 28, 2016
Well you are correct in that the 44 should also be parametrizable.
I believe this problem is best fixed if we add two variables with sensible default values instead of using hardcoded 44 and 5. The variable for the amount of rows would be a maximum like so:
height = min(suggestions.count, maxNumberOfRows)What do you think?
The question that arises then is what if there are no suggestions? Show x empty rows? Showing nothing might not look good.
A possibility would be:
height = max(3, min(suggestions.count, maxNumberOfRows))