-
Notifications
You must be signed in to change notification settings - Fork 25
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
improv: allow defining limits for elastic grid #14
Conversation
packages/swayze/lib/src/core/controller/table/header_state.dart
Outdated
Show resolved
Hide resolved
packages/swayze/lib/src/core/controller/table/header_state.dart
Outdated
Show resolved
Hide resolved
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.
Looks good to me 👍
Two additional things:
- Do we want to add this change to the changelog now or later?
- Do we want to add this some docs so that it becomes clear that we now support this?
packages/swayze/lib/src/core/controller/cells/cells_controller.dart
Outdated
Show resolved
Hide resolved
final maxPosition = elasticCount != null | ||
// in case the user has settled a max elastic count, we should | ||
// limit the grid expansion to that count, however, if that limit | ||
// is lower than the table size, we should prioritize the table size |
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.
if that limit is lower than the table size, we should prioritize the table size over it.
Shouldn't it always be lower than maxElasticCount
? In which case does it make sense to have a table bigger than maxElasticCount
?
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.
it's more of a safe check, there shouldn't be a use case for that
93939c6
to
b1158db
Compare
Maybe when we merge to Or when we add the |
That's fine by me, as long as we create an issue to track it 😄 |
Context
Allows defining the max amount of columns or rows that the elastic grid can have.
Approach
Allows to settle
maxElasticColumns
andmaxElasticRows
onSwayzeTableDataController
.