render()

in web/timebase-datasource-plugin/src/view/Function/Function.tsx [190:231]


  render() {
    return (
      <div className={`gf-form-label ${this.props.className != null ? this.props.className : ''}`}>
        <FunctionHeaderComponent
          className={this.props.className}
          hideName={this.props.hideName}
          description={this.props.description}
          value={this.props.value}
          schema={this.props.schema}
          dependsSelect={this.props.dependsSelect}
          disableColoring={this.props.disableColoring}
          onRemove={() => {
            if (this.props.onRemove != null) {
              this.props.onRemove(this.props.index);
            }
          }}
          emitValue={this.emitValue}
        />
        <div>(</div>
        {this.getContent()}
        <div>)</div>
        <ReturnFieldComponent
          value={this.props.value}
          removeFunctionReturnField={this.removeFunctionReturnField}
          changeFunctionValueAlias={this.changeFunctionValueAlias}
        />

        {this.state.showAlias ? (
          <div className={cx('gf-form-inline h-32', styles)}>
            <div className={cx('gf-form-label gf-form-label-mr gf-form-p', styles)}> as </div>
            <SegmentFrame className="gf-form-inline" hideShadow={true}>
              <SegmentInput
                className={cx('gf-form-segment-input', styles)}
                value={this.props.value.as as string}
                onChange={this.changeFunctionAlias}
              />
            </SegmentFrame>
          </div>
        ) : null}
      </div>
    );
  }