Skip to content

Commit 92d178c

Browse files
authored
add error boundary for tables (#7362)
## 📝 Summary <!-- Provide a concise summary of what this pull request is addressing. If this PR fixes any issues, list them here by number (e.g., Fixes #123). --> Prevents tables from not rendering at all, shows an error with a message. <img width="821" height="251" alt="image" src="https://github.com/user-attachments/assets/4c834ad8-2bd2-47d5-9edc-dab9b62bb559" /> ## 🔍 Description of Changes <!-- Detail the specific changes made in this pull request. Explain the problem addressed and how it was resolved. If applicable, provide before and after comparisons, screenshots, or any relevant details to help reviewers understand the changes easily. --> ## 📋 Checklist - [x] I have read the [contributor guidelines](https://github.com/marimo-team/marimo/blob/main/CONTRIBUTING.md). - [ ] For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on [Discord](https://marimo.io/discord?ref=pr), or the community [discussions](https://github.com/marimo-team/marimo/discussions) (Please provide a link if applicable). - [ ] I have added tests for the changes made. - [x] I have run the code and verified that it works as expected.
1 parent bbc6240 commit 92d178c

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

frontend/src/plugins/impl/DataTablePlugin.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ import {
5555
getPageIndexForRow,
5656
loadTableData,
5757
} from "@/components/data-table/utils";
58+
import { ErrorBoundary } from "@/components/editor/boundary/ErrorBoundary";
5859
import { ContextAwarePanelItem } from "@/components/editor/chrome/panels/context-aware-panel/context-aware-panel";
5960
import { Alert, AlertTitle } from "@/components/ui/alert";
6061
import { Button } from "@/components/ui/button";
@@ -1016,10 +1017,12 @@ export const TableProviders: React.FC<{ children: React.ReactNode }> = ({
10161017
children,
10171018
}) => {
10181019
return (
1019-
<Provider store={store}>
1020-
<SlotzProvider controller={slotsController}>
1021-
<TooltipProvider>{children}</TooltipProvider>
1022-
</SlotzProvider>
1023-
</Provider>
1020+
<ErrorBoundary>
1021+
<Provider store={store}>
1022+
<SlotzProvider controller={slotsController}>
1023+
<TooltipProvider>{children}</TooltipProvider>
1024+
</SlotzProvider>
1025+
</Provider>
1026+
</ErrorBoundary>
10241027
);
10251028
};

marimo/_smoke_tests/pandas/dates.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import marimo
22

3-
__generated_with = "0.17.6"
3+
__generated_with = "0.17.8"
44
app = marimo.App(width="medium")
55

66

@@ -99,5 +99,12 @@ def _(mo, pd):
9999
return
100100

101101

102+
@app.cell
103+
def _(datetime, pd):
104+
dates_with_null = pd.DataFrame({"mixed": [datetime.now(), None]})
105+
dates_with_null
106+
return
107+
108+
102109
if __name__ == "__main__":
103110
app.run()

0 commit comments

Comments
 (0)