-
Notifications
You must be signed in to change notification settings - Fork 79
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
add row select to plugin table #3381
Conversation
d420f50
to
46433dc
Compare
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.
LGTM!
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.
Still good!
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.
Exposing these looks good to me! There were 2 things I was thinking about when testing.
One is if we want a more applicable Error to be thrown if there is yet to be a catalog loaded, or if the no sources were found and the user tries to select.
The second, I don't think deselecting a particular row would get much use from the API (although deselecting rows and deselecting all is possible from the UI), but deselect_all
might be nice to have too.
@gibsongreen thanks for the review, I added the 'deselect_all' method I'm trying to decide what to do about warnings. Since this is not catalog plugin specific, adding a check in the table class's select_rows for the presence of a catalog doesn't make sense and I'm not sure if it would be worth doing this in the plugin by overriding select_rows, raising the warning, then calling table.select_rows. I think the resulting index error is fairly informative if you try to select from a non-populated table, personally. Happy to make this change though if you disagree |
If you want to keep it generic, maybe |
For error, a generic |
add row select method to Table and table mixin to allow selection by row index, indicies, or slice(s). Also adds 'select all' method.