1.0.2 • Published 2 years ago

vue-enter-to-tab v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

vue-enter-to-tab

A mixin to use the enter key as tab key behavior. You can see a demo here.

Install

NPM:

npm i --save vue-enter-to-tab

Usage instructions

Install the mixin globally on your main file. It's required to install it as follows:

import VueEnterToTab from 'vue-enter-to-tab';

Vue.use(VueEnterToTab, initialStatus);

Where initialStatus indicates if the mixin is enabled or not initially. By default, it's true.

How to use it

After the installation, you can use the mixin on the component you need:

import {EnterToTabMixin} from 'vue-enter-to-tab';
export default {
  ...
  mixins: [EnterToTabMixin],
  ...
}

Other Utilities

NameDescriptionType
$isEnterToTabEnabledData to indicate if mixin is enableBoolean
$enabledEnterToTabMethod to enable the mixinMethod
$disableEnterToTabMethod to disable the mixinMethod
$setEnterToTabStatusMethod to set manually the mixin status. It receives as only paramater the status to setMethod
$toggleEnterToTabMethod to toggle the mixin statusMethod
v-prevent-enter-tabDirective to use in those inputs you want to avoid use enter as keyDirective

These utilities are available globally, on all Vue instance.

Note: This directive doesn't work on textarea elements.

Any contribution is welcome. Visit my web page here.

License

MIT