首页 > 解决方案 > x-grid components option/prop 抛出 Invalid Element type 错误

问题描述

我正在为组件使用 components 选项/prop,x-grid如下所示:

            components={{
              Checkbox: {
                  checkedIcon: () => <Check />,
                  icon: () => <Clear />,
              },
            }}

我尝试了几种排列来避免以下错误:

Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.

Check the render method of `ForwardRef`.

有没有人看到我做错了什么明显的事情?

先感谢您!

标签: material-uimaterial-ui-x

解决方案


推荐阅读