import React from "react"; import BaseControl, { ControlProps } from "./BaseControl"; import { ControlWrapper, StyledInputGroup } from "./StyledControls"; import { Button } from "@blueprintjs/core"; import { DropdownOption } from "widgets/DropdownWidget"; import { ControlType } from "constants/PropertyControlConstants"; import { generateReactKey } from "utils/generators"; class OptionControl extends BaseControl { render() { const options: DropdownOption[] = this.props.propertyValue || [{}]; return ( {options.map((option, index) => { return ( ) => { this.updateOptionLabel(index, event.target.value); }} defaultValue={option.label} /> ) => { this.updateOptionValue(index, event.target.value); }} defaultValue={option.value} /> ); })}