Skip to content

Conversation

kevintcaron
Copy link

@kevintcaron kevintcaron commented Jun 26, 2025

Hi @sfc-gh-tteixeira,

Thanks for creating this great custom component — and for building Streamlit! It’s a fantastic tool that I’ve used extensively for both work and personal projects.

This pull request adds a few enhancements that I’ve found useful and that others might benefit from as well.

Summary of Updates
Streamlit Theme Integration:
Slickgrid now aligns with Streamlit’s theme system (light, dark, and custom) by applying theme-based variables to background, text, and highlight colors.

Selection Toggling:
Enables users to deselect by clicking a selected cell again, and reselect it on another click.
Fixes #4

Visual Feedback for Selection:
Applies theme-colored hover and selection styles (for rows or cells) based on the options provided.

options = {
    # Enables row or cell selection highlight behavior
    "enableRowSelection": True,  # True enables row selection (requires enableCellNavigation=True)
    "enableCellNavigation": True,  # True allows cell selection visualization (enableRowSelection must be False)
}

Let me know if you'd prefer any of these changes to be submitted as separate pull requests, or if you'd like me to add documentation or tests.

Thanks again!

@kevintcaron
Copy link
Author

kevintcaron commented Jul 4, 2025

Just fixed a small bug where the styling would be incorrect if expanders were clicked for nested rows after styles were applied. This should work as intended now. Also added functionality for cell Navigation visualization on hover (cell borders highlight instead of row borders). Please let me know if you see any other issues or improvements that can be made!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clicking twice in the same cell doesn't generate click events.
1 participant