Line 22 of dummy-layout.tsx within widgets/common/controller/src/runtime/builder/layout/dummy-layout.tsx imports LayoutItemToolbar:
import { LayoutItemToolbar } from 'jimu-layouts/lib/builder/layout-item-toolbar'
I assume that you made a copy of the Controller widget source code and tried to make a custom Controller widget.
However, the LayoutItemToolbar is an internal component which is not intended for custom widgets. The LayoutItemToolbar displays as a toolbar of the selected widget in the builder. It provides some widget tools, such as "Quick Style"(Button, Divider) and "Edit"(Text). You can remove the code related to LayoutItemToolbar in the custom Controller. This won't affect other parts of the Controller's logic.
Please let me know if you run into any furthur issues. Thanks!
@Shen_Zhang wrote:I assume that you made a copy of the Controller widget source code and tried to make a custom Controller widget.
However, the LayoutItemToolbar is an internal component which is not intended for custom widgets. The LayoutItemToolbar displays as a toolbar of the selected widget in the builder. It provides some widget tools, such as "Quick Style"(Button, Divider) and "Edit"(Text). You can remove the code related to LayoutItemToolbar in the custom Controller. This won't affect other parts of the Controller's logic.
Please let me know if you run into any furthur issues. Thanks!
Hijacking this thread because this is exactly what I'm trying to do. Removing the code related to LayoutItemToolbar breaks everything.. You can't be serious this component can't be used for custom widgets...That's a joke... Why make a "customizable" platform if you cant customise anything... Really disappointed.
To anyone looking to do this, replace the LayoutItemToolbar import with the line below and replace all the mentions. It will give an error, but it will compile and run just fine.
import { Toolbar } from 'jimu-layouts/layout-builder'
@Shen_Zhang , Please add LayoutItemToolbar,
It's not make sense that developers need to find that post to discover that component is not part of custom widgets.
If so, esri sould document that.
Please help the developer experience so that they can really have a development experience.
After all it's all about the experience 😉