Question about custom widget in version 4.x

184
1
01-21-2019 12:45 AM
AyakoSUZUKI
New Contributor III

I am trying to create a custom widget and I use Esri's widget as a part of the widget.

So I instantiated Esri's widget and set JSX.Element in container property.

However the customized widget does not show the Esri's widget in the element.

Is it possible to add a widget in customized widget?

Does anyone know any information about it?

Below is a part of my source code.

@property()
@renderable()
element: JSX.Element;

render() {
      return(
            <div
                  class={CSS.base}>
                  {this.element}
            </div>
      );
}

private _onViewReady() {
      const search = new Search({
            view: this.view,
            container: this.element as HTMLElement
      });
}

I do not deeply understand TypeScript and widget development, so I could miss something...

Any comment is really helpful!

0 Kudos
1 Reply
AndrewTerwiel
Occasional Contributor II

I've been creating my first custom widgets and have found these tutorials helpful. You need to take some time to understand these to have a basic understanding of the development process and concepts.

0 Kudos