-
Notifications
You must be signed in to change notification settings - Fork 306
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
Rendering multiple questions in the same line. #2789
base: master
Are you sure you want to change the base?
Rendering multiple questions in the same line. #2789
Conversation
@Itskiprotich Can you please test this and share your observations? |
Sure @santosh-pingle. Thanks for the tag. |
@santosh-pingle Thanks for this implementation. I have observed the following: I have multiple groups, each with a fixed columnCount. When the number of items in a group exceeds this count, they should wrap to the next row. However, this behavior only applies to the first group—subsequent groups do not wrap properly.
I'm attaching here the sample Questionnaire: |
Items can be displayed horizontally by grouping them under a group-type item and applying the column count extension. If the number of child items is a multiple of the column count value, they will be arranged evenly in rows. |
Thanks @santosh-pingle. I'll share my observations |
return if (columnCounts.isNotEmpty()) { | ||
columnCounts.reduce { acc, value -> lcm(acc, value) } | ||
} else { | ||
null | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return if (columnCounts.isNotEmpty()) { | |
columnCounts.reduce { acc, value -> lcm(acc, value) } | |
} else { | |
null | |
} | |
return columnCounts.reduceOrNull { acc, value -> lcm(acc, value) } |
try this?
IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).
Fixes #2788
Description
Implement column count extension.
If column count extension present then apply grid layout manager.
Alternative(s) considered
Have you considered any alternatives? And if so, why have you chosen the approach in this PR?
Type
Choose one: Bug fix
Screenshots (if applicable)
Checklist
./gradlew spotlessApply
and./gradlew spotlessCheck
to check my code follows the style guide of this project../gradlew check
and./gradlew connectedCheck
to test my changes locally.