import React from 'react'; import classNames from 'classnames'; interface Props { placeholder?: string; value?: string; text?: string; editable?: boolean; onChange?: any; onPressEnter?: any; maxLength?: number; } export class SessionIdEditable extends React.PureComponent { private readonly inputRef: any; public constructor(props: Props) { super(props); this.inputRef = React.createRef(); this.handleChange = this.handleChange.bind(this); this.handleKeyDown = this.handleKeyDown.bind(this); } public focus() { if (this.inputRef.current) { this.inputRef.current.focus(); } } public render() { const { placeholder, editable, text, value, maxLength } = this.props; return (