vue-enter-to-tab

1.0.2 • Public • Published

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

Name Description Type
$isEnterToTabEnabled Data to indicate if mixin is enable Boolean
$enabledEnterToTab Method to enable the mixin Method
$disableEnterToTab Method to disable the mixin Method
$setEnterToTabStatus Method to set manually the mixin status. It receives as only paramater the status to set Method
$toggleEnterToTab Method to toggle the mixin status Method
v-prevent-enter-tab Directive to use in those inputs you want to avoid use enter as key Directive

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

Package Sidebar

Install

npm i vue-enter-to-tab

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

5.4 kB

Total Files

4

Last publish

Collaborators

  • ajomuch92