-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
I use fastapi_tortoiseorm examples and add a widget in models.py
@register_widget
class TestWidget(DashboardWidgetAdmin):
title = "for test"
dashboard_widget_type = DashboardWidgetType.ChartBar
x_field = "name"
y_field = "value"
order = 1
async def get_data(self, *args, **kwargs):
return {
"results": {
"1": 1,
"2": 2,
"3": 3,
"4": 4,
"5": 5,
},
"min_x_field": 1,
"max_x_field": 5,
"period_x_field": "hour"
}
And page blank after login. error log in console is:
Uncaught Error: A React Element from an older version of React was rendered. This is not supported. It can happen if:
- Multiple copies of the "react" package is used.
- A library pre-bundled an old copy of "react" or "react/jsx-runtime".
- A compiler tries to "inline" JSX instead of using the runtime.
at throwOnInvalidObjectType (react-dom-client.development.js:7078:15)
at reconcileChildFibersImpl (react-dom-client.development.js:8017:11)
at react-dom-client.development.js:8057:33
at reconcileChildren (react-dom-client.development.js:8621:13)
at updateForwardRef (react-dom-client.development.js:8662:7)
at beginWork (react-dom-client.development.js:10861:18)
at runWithFiberInDEV (react-dom-client.development.js:1519:30)
at performUnitOfWork (react-dom-client.development.js:15132:22)
at workLoopSync (react-dom-client.development.js:14956:41)
at renderRootSync (react-dom-client.development.js:14936:11)
Error still occurs when i recompile the frontend and run it in dev mode.
Metadata
Metadata
Assignees
Labels
No labels