Skip to content

Add an option for rows in data_editor checkbox columns where the checkbox is completely hidden. #14692

@eskildsf

Description

@eskildsf

Checklist

  • I have searched the existing issues for similar issues.
  • I added a very descriptive title to this issue.
  • I have provided sufficient information below to help reproduce this issue.

Summary

Note from maintainer: this is expected behaviour. Currently, if None is provided the checkbox still appears on hover allowing the value to be updated to true/false. Changed this to an enhancement request enabling the user to customize this behaviour.

Hello

Consider data which can take on values True, False or None. When the st.column_config.CheckboxColumn is specified for the column representing this data then True results in a ticked checkbox, False in a un-ticked checkbox and None results in no checkbox at all. However, when hovering the cell with the None value, a checkbox appears and it accepts input.

This is quite strange to end-users since input fields don't typically appear on hover.

Reproducible Code Example

import streamlit as st

data = st.data_editor(
  [
    {"Title": "Row 1", "Checkbox": True}, # Renders as ticked checkbox
    {"Title": "Row 2", "Checkbox": False}, # Renders as un-ticked checkbox
    {"Title": "Row 3", "Checkbox": None}, # Renders without checkbox. Checkbox appears on hover.
  ],
  column_config={
    "Title": st.column_config.TextColumn(None),
    "Checkbox": st.column_config.CheckboxColumn(None),
  },
)

Steps To Reproduce

No response

Expected Behavior

If a None value is supplied don't show a checkbox at all, even when hovering the cell.

I should note that I find it very useful to be able to only show checkboxes in specific rows in data_editor tables.

Current Behavior

No response

Is this a regression?

  • Yes, this used to work in a previous version.

Debug info

  • Streamlit version: 1.56.0
  • Python version: 3.13.7
  • Operating System: Ubuntu
  • Browser: Chrome

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature:st.column_configRelated to column configuration functionalityfeature:st.data_editorRelated to the `st.data_editor` widgettype:enhancementRequests for feature enhancements or new features

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions