Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { Color } from '../colors';
import * as React from 'react';
import { ChevronIcon } from '../select';
// tslint:disable-next-line:no-submodule-imports
const CreatableSelect = require('react-select/lib/Creatable').default;
export type CreateSelectActionType =
| 'clear'
| 'create-option'
| 'deselect-option'
| 'pop-value'
| 'remove-value'
| 'select-option'
| 'set-value';
export type CreateSelectAction =
| { action: 'clear' | 'create-option' | 'deselect-option' | 'select-option' | 'set-value' }
| { action: 'pop-value' | 'remove-value'; removedValue: CreateSelectOption };
export interface CreateSelectProps {
autoFocus?: boolean;
const React = require('react');
const { _ } = require('lib/locale.js');
const { themeStyle } = require('../theme.js');
const { time } = require('lib/time-utils.js');
const Datetime = require('react-datetime');
const CreatableSelect = require('react-select/lib/Creatable').default;
const Select = require('react-select').default;
const makeAnimated = require('react-select/lib/animated').default;
class PromptDialog extends React.Component {
constructor() {
super();
this.answerInput_ = React.createRef();
}
componentWillMount() {
this.setState({
visible: false,
answer: this.props.defaultValue ? this.props.defaultValue : '',
});
this.focusInput_ = true;