aboutsummaryrefslogtreecommitdiff
path: root/src/settings/components/form/SearchForm.tsx
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2019-12-22 11:10:36 +0900
committerGitHub <noreply@github.com>2019-12-22 11:10:36 +0900
commitb1a6f374dca078dee2406ebe049715b826e37ca2 (patch)
tree5367c48648e2018f55f12d847baba94559e10040 /src/settings/components/form/SearchForm.tsx
parentb2dcdedad729ff7087867da50e20578f9fc8fb29 (diff)
parentda72c2ddd916d79d134662e3985b53a4ac78af7a (diff)
Merge pull request #690 from ueokande/eslint-and-prettier
Eslint and prettier
Diffstat (limited to 'src/settings/components/form/SearchForm.tsx')
-rw-r--r--src/settings/components/form/SearchForm.tsx12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/settings/components/form/SearchForm.tsx b/src/settings/components/form/SearchForm.tsx
index 0aaf6fd..5dc786b 100644
--- a/src/settings/components/form/SearchForm.tsx
+++ b/src/settings/components/form/SearchForm.tsx
@@ -18,7 +18,7 @@ class SearchForm extends React.Component<Props> {
};
render() {
- let value = this.props.value.toJSON();
+ const value = this.props.value.toJSON();
return <div className='form-search-form'>
<div className='form-search-form-header'>
<div className='column-name'>Name</div>
@@ -56,10 +56,10 @@ class SearchForm extends React.Component<Props> {
// eslint-disable-next-line max-statements
bindValue(e: any) {
- let value = this.props.value.toJSON();
- let name = e.target.name;
- let index = Number(e.target.getAttribute('data-index'));
- let next: typeof value = {
+ const value = this.props.value.toJSON();
+ const name = e.target.name;
+ const index = Number(e.target.getAttribute('data-index'));
+ const next: typeof value = {
default: value.default,
engines: value.engines.slice(),
};
@@ -76,7 +76,7 @@ class SearchForm extends React.Component<Props> {
} else if (name === 'delete' && value.engines.length > 1) {
next.engines.splice(index, 1);
if (value.engines[index][0] === value.default) {
- let nextIndex = Math.min(index, next.engines.length - 1);
+ const nextIndex = Math.min(index, next.engines.length - 1);
next.default = next.engines[nextIndex][0];
}
}