auto focus input, url shortened
This commit is contained in:
@@ -76,7 +76,7 @@ class Main extends Component {
|
||||
<Segment className={this.classes.mainSegment} padded="very">
|
||||
<Switch>
|
||||
<Route exact path="/" component={Home} />
|
||||
<Route path="/passwords" component={PasswordManager} />
|
||||
<Route path="/p" component={PasswordManager} />
|
||||
</Switch>
|
||||
<img alt="" className={this.classes.ninja} src={require('../files/images/ninja.svg')} />
|
||||
</Segment>
|
||||
|
@@ -76,6 +76,9 @@ const PasswordManager = inject("rootStore") ( observer(
|
||||
|
||||
componentDidMount() {
|
||||
this.fetchData();
|
||||
|
||||
//Focus on search input
|
||||
document.getElementById('search').focus();
|
||||
}
|
||||
|
||||
|
||||
@@ -230,7 +233,7 @@ const PasswordManager = inject("rootStore") ( observer(
|
||||
<Headline black="Password " red="manager" />
|
||||
|
||||
<Input icon placeholder='Search...'>
|
||||
<input type='text' placeholder='Search...' name="search" onChange={this.onChangeInput} autoComplete="off" />
|
||||
<input type='text' id="search" placeholder='Search...' name="search" onChange={this.onChangeInput} autoComplete="off" />
|
||||
<Icon name='search' />
|
||||
</Input>
|
||||
|
||||
|
Reference in New Issue
Block a user