Skip to content

data_editor integrated within tabs doesn't behave as expected #8024

@Light2Dark

Description

@Light2Dark

Discussed in #8010

Originally posted by julien-siguenza January 28, 2026
Hi there!

I'm posting my question here, I'm not sure if it's the right place for this.

I'm trying to integrate a data_editor with a tabs widget.

Here is my code:

import marimo as mo
import pandas as pd

df = pd.DataFrame({"A": [1, 2, 3], "B": ["a", "b", "c"]})

editor = mo.ui.data_editor(data=df, label="Edit Data")

dict_tabs = {
    "tab1": editor,
    "tab2": "test"
}

tabs = mo.ui.tabs(
    tabs=dict_tabs,
)

tabs

But when I'm editing the data_editor and then switch the tab, the values I edited just disappear.

Is it an expected behavior?
How should I do if I want to integrate an editable data_editor within a tab?

Thanks for helping!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions