Use editable_row_callback to determine if row should be editable#195
Merged
TimShawver merged 21 commits intomasterfrom Jul 10, 2018
Merged
Use editable_row_callback to determine if row should be editable#195TimShawver merged 21 commits intomasterfrom
TimShawver merged 21 commits intomasterfrom
Conversation
768d404 to
7d1a763
Compare
Contributor
Author
|
@vardaofthevalier sorry about the delay in merging this, I was busy with making qgrid available on Quantopian (see https://www.quantopian.com/posts/qgrid-now-available-in-research-an-interactive-grid-for-sorting-and-filtering-dataframes) and also wanted to some more time to think about how the "setting cell value" piece should work. I'm wondering if we should re-use the editing code path that already exists for editing a cell by double clicking. I'll update this PR with my thoughts once I have some more time to think about it. |
…nd rows are editable
…or non-integer indexes; improved the row edit condition evaluation
… column name value and data value
…default behavior of having the column be editable.
7d1a763 to
be4044e
Compare
added 13 commits
July 2, 2018 15:27
…, maxWidth, minWidth, and width.
…naming of the "cell_edited" event that will be fired as a result of this action.
…ent with the naming scheme of the events API.
…slick grid by default. We use a font-awesome icon instead.
…id to flicker and the kernel to remain in use.
…ed docs for add/remove row API methods. There's now just 'add_row' and 'remove_rows' methods (previously called 'remove_row'). Specify whether an add/remove event came from a button click or an API call.
…row (or rows) in the grid.
…a backlog of events that had to be processed, causing scrolling to appear to be really slow. This was especially apparent in hosted environments like Q where latency is more of an issue.
…m with single quotes, issue #209.
…of constructing a QgridWidget instance.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a branch off of the following PR: #191
My reasoning for using a callback function is it's more flexible/powerful and fewer lines of code for us to maintain.
Also I'm thinking ahead to other similar features which we'll want, like have the ability to highlight rows/cells with a background color based on the contents of the rows. For those cases we'll definitely want the ability to do stuff like highlight all rows where an integer is less than zero. With a callback function we can handle that type of comparison, because we'll have the full power of python available to us in the callback, rather than being limited to a subset that we've added support for in the row_edit_conditions grammar.
There's one other small tweak here which is to make it so that columns default to being editable if the editable attribute is not specified when constructing the
QgridWidget. This is only an issue when constructingQgridWidgetdirectly so you wouldn't have noticed it if you've just been testing withshow_grid.