Hide and show columns, allow for zero to 3 columns, query param for numColumns#141
Hide and show columns, allow for zero to 3 columns, query param for numColumns#141Gaurav0 merged 19 commits intoember-cli:masterfrom
Conversation
There was a problem hiding this comment.
Might be nice to refactor this to use a computed property rather than an observer
|
This PR is complete. Please review. |
…into hide-and-show-cols
…-twiddle into hide-and-show-cols
|
@stefanpenner @joostdevries @rwjblue Updated. Pretty please review. |
There was a problem hiding this comment.
I'm curious, it seems like rather then making this controller have array like qualities. Having the columns represented off-object would be clean. Something like:
controller.columns === [
col1,
col2,
col3
]columns: computed('dataColumnsNeed', function() {
return ensureColums(this.get('dataColumnsNeed'))
});the return columns object itself doesn't need to be an array, but may prove to be nice if it ways.
This would also make it easy to support N columns, if we are so inclined, but also begins to move to a pull based system over the imperative model.
some relevant code this would tidy up nicely:
|
@stefanpenner Updated. Could you please review again? |
There was a problem hiding this comment.
this CP at first glance appears to indicate, it will provide the last column. But after reading the implementation it seems to actually return true/false. Maybe it should be isLastColumn ?
There was a problem hiding this comment.
should likely not put a complex object on the prototype, especially if it is meant to hold instance state.
Likley either set this in the constructor, or make it a cp.
There was a problem hiding this comment.
Setting in constructor.
|
@stefanpenner Are there any further issues or may I merge this? |
…into hide-and-show-cols
Hide and show columns, allow for zero to 3 columns, query param for numColumns
Relevant to #65, #100, #122