Appease the linting gods
parent
6b92c0b5f1
commit
7bbd6e1e3d
|
@ -76,20 +76,24 @@ class TemplateControlBar extends Component<Props, State> {
|
|||
)
|
||||
}
|
||||
|
||||
return templates.map(template => (
|
||||
<TemplateControl
|
||||
key={template.id}
|
||||
meRole={meRole}
|
||||
isUsingAuth={isUsingAuth}
|
||||
template={template}
|
||||
templates={templates}
|
||||
source={source}
|
||||
onPickValue={v => onPickTemplate(template, v)}
|
||||
onCreateTemplate={this.handleCreateTemplate}
|
||||
onUpdateTemplate={this.handleUpdateTemplate}
|
||||
onDeleteTemplate={this.handleDeleteTemplate}
|
||||
/>
|
||||
))
|
||||
return templates.map(template => {
|
||||
const onPickValue = v => onPickTemplate(template, v)
|
||||
|
||||
return (
|
||||
<TemplateControl
|
||||
key={template.id}
|
||||
meRole={meRole}
|
||||
isUsingAuth={isUsingAuth}
|
||||
template={template}
|
||||
templates={templates}
|
||||
source={source}
|
||||
onPickValue={onPickValue}
|
||||
onCreateTemplate={this.handleCreateTemplate}
|
||||
onUpdateTemplate={this.handleUpdateTemplate}
|
||||
onDeleteTemplate={this.handleDeleteTemplate}
|
||||
/>
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
private handleAddVariable = (): void => {
|
||||
|
|
|
@ -19,18 +19,18 @@ interface State {
|
|||
}
|
||||
|
||||
class TextTemplateSelector extends PureComponent<Props, State> {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
this.state = {text: ''}
|
||||
}
|
||||
|
||||
public static getDerivedStateFromProps(props) {
|
||||
const text = getDeep<string>(props, 'template.values.0.value', '')
|
||||
|
||||
return {text}
|
||||
}
|
||||
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
||||
this.state = {text: ''}
|
||||
}
|
||||
|
||||
public render() {
|
||||
const {text} = this.state
|
||||
|
||||
|
|
Loading…
Reference in New Issue