Files
directus/src/directives/focus
dependabot-preview[bot] 26960961e8 Bump prettier from 1.19.1 to 2.0.2 (#239)
* Bump prettier from 1.19.1 to 2.0.2

Bumps [prettier](https://github.com/prettier/prettier) from 1.19.1 to 2.0.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/1.19.1...2.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Add dangling comma's

* Update eslint config to match prettier default

* Make eslint match prettier for real this time

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2020-03-24 10:51:30 -04:00
..
2020-03-11 17:02:45 -04:00

Focus

The focus directive is basically autofocus, but works in Vue. Because of the way HTML works, autofocus isn't triggered for DOM elements that are added after first load, which means that autofocus basically never works in the context of the Directus app. That's where you can use v-focus instead:

<v-input v-focus />

Value

You can pass it a boolean value if you need more fine grained control over when focus is set:

<v-input v-focus="active" />