-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Lendemor/add datagrid editor #1941
Conversation
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.
Component works great! Mostly some code style comments
# allow copy paste or not | ||
get_cell_for_selection: Var[bool] | ||
|
||
on_paste: Var[bool] |
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.
Should this be an event trigger?
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.
not sure how to handle this one as it accept both a boolean and a callback... I went with disabling it by default for now)
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!
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.
Can we change theme -> style for consistency with the rest of the components
I'm not sure how to go about that, I could make an alias "style" that set the theme props, but I can't change the props of the component itself. |
The component treats themes differently from styles, i.e these theme values are passed to the class DataGridTheme(rx.Base):
accent_color: str
... similar to what we do for radix so we're able to check and tell users what fields to pass. It would be worth mentioning in the docs or pointing users to the right docs on what values are allowed as theme key-values as well. Although Im not particularly sure how to go about IDE type hinting like we do using literals in this case |
Yes I'm working on adding something similar 👍 |
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.
awesome work
class DataEditorTheme(Base): | ||
"""The theme for the DataEditor component.""" | ||
|
||
accentColor: Optional[str] = None |
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.
We should make these snake_case and convert them internally for consistency
Wrap
@glideapps/glide-data-grid
to include a new Data Editor with more functionality thanrx.datatable
.Use case :
Closes #431 #468