change the focus to next in angular forms
JavaScript
import { Directive, ElementRef, HostListener, Input } from '@angular/core';
@Directive({
selector: '[moveNextByMaxLength]'
})
export class MoveNextByMaxLengthDirective {
constructor(private _el: ElementRef) { }
@HostListener('keyup', ['$event']) onKeyDown(e: any) {
if (e.srcElement.maxLength === e.srcElement.value.length) {
e.preventDefault();
let nextControl: any = e.srcElement.nextElementSibling;
// Searching for next similar control to set it focus
while (true)
{
if (nextControl)
{
if (nextControl.type === e.srcElement.type)
{
nextControl.focus();
return;
}
else
{
nextControl = nextControl.nextElementSibling;
}
}
else
{
return;
}
}
}
}
}
Also in JavaScript:
- Title
- function isValidWalk(walk)
- Category
- JavaScript
- Title
- how to find out what a string ends with in javascript
- Category
- JavaScript
- Title
- capitalize first letter javascript
- Category
- JavaScript
- Title
- how to have your discord bot send two message
- Category
- JavaScript
- Title
- array to set javascript
- Category
- JavaScript
- Title
- how to access data in firebase realtime
- Category
- JavaScript
- Title
- Add object to array javascript
- Category
- JavaScript
- Title
- how to check if a number is even or odd in javascript
- Category
- JavaScript
- Title
- how to add element in json object
- Category
- JavaScript
- Title
- find and delete element from array js
- Category
- JavaScript
- Title
- javascript array flat
- Category
- JavaScript
- Title
- anagram javascript example
- Category
- JavaScript
- Title
- get caret index js
- Category
- JavaScript
- Title
- how to delete element in list javascript
- Category
- JavaScript
- Title
- do more than one thing at start of or loop javascript
- Category
- JavaScript
- Title
- add 2 class names react
- Category
- JavaScript
- Title
- dom create element
- Category
- JavaScript
- Title
- ionic modal navbar not showing
- Category
- JavaScript
- Title
- box shadow javascript style change
- Category
- JavaScript
- Title
- javascript check if array is empty
- Category
- JavaScript
- Title
- javascript add multiple items to array
- Category
- JavaScript
- Title
- edje js not pre compile for node 12 version
- Category
- JavaScript
- Title
- command to create react app
- Category
- JavaScript
- Title
- create a customer in stripe node.js
- Category
- JavaScript
- Title
- console.log javascript
- Category
- JavaScript
- Title
- async fetch api call
- Category
- JavaScript
- Title
- how to paste in input field react native
- Category
- JavaScript
- Title
- funciones invocan a funciones javascript
- Category
- JavaScript
- Title
- .change() in pure js
- Category
- JavaScript
- Title
- firebase configuration on functions
- Category
- JavaScript
- Title
- compare dates in javascript
- Category
- JavaScript
- Title
- angular npm angular material
- Category
- JavaScript
- Title
- how to learn javascript
- Category
- JavaScript
- Title
- document load javascript
- Category
- JavaScript
- Title
- how to print an array javascript
- Category
- JavaScript
- Title
- get full url nodejs
- Category
- JavaScript
- Title
- clone an object in javascript
- Category
- JavaScript
- Title
- javascript ajax post send an object
- Category
- JavaScript
- Title
- javascript exercism.io bob solution
- Category
- JavaScript
- Title
- how to code print in javascript
- Category
- JavaScript
- Title
- ERROR in ./node_modules/tns-core-modules/ui/core/view/view.js Module not found: Error: Can't resolve '@nativescript/core/ui/core/view/view' in '/home/deepali/projects/supersquad-client/node_modules/tns-core-modules/ui/core/view'
- Category
- JavaScript
- Title
- angular img
- Category
- JavaScript
- Title
- get utc time javascript
- Category
- JavaScript
- Title
- how to import jquery in js file
- Category
- JavaScript
- Title
- d3 paning
- Category
- JavaScript
- Title
- assign freemarker expressions to variables
- Category
- JavaScript
- Title
- bootstrap javascript cdn
- Category
- JavaScript
- Title
- end code nodejs
- Category
- JavaScript
- Title
- change innertext javascript
- Category
- JavaScript
- Title
- detect a click outside an element javascript
- Category
- JavaScript
- Title
- angular themeable components
- Category
- JavaScript
- Title
- get the size of the screen javascript
- Category
- JavaScript
- Title
- how to generate random character from an array js
- Category
- JavaScript
- Title
- check if array has same values javascript
- Category
- JavaScript
- Title
- foreach break js
- Category
- JavaScript
- Title
- array meses javascript
- Category
- JavaScript
- Title
- Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.
- Category
- JavaScript
- Title
- how to define cardTitle background image in mdl in reactjs
- Category
- JavaScript
- Title
- javascript add to a dictionary
- Category
- JavaScript
- Title
- how to pass state from parent to child in react
- Category
- JavaScript
- Title
- javascript array concat spread operator
- Category
- JavaScript
- Title
- how to use fetch in node js
- Category
- JavaScript
- Title
- javascript compose function
- Category
- JavaScript
- Title
- Javascript compare two dates
- Category
- JavaScript
- Title
- give two parameters for find in mongodb
- Category
- JavaScript
- Title
- how to find max number in array javascript
- Category
- JavaScript
- Title
- javascript array filter
- Category
- JavaScript
- Title
- aws amplify get JWT TOKEN
- Category
- JavaScript
- Title
- async foreach
- Category
- JavaScript
- Title
- i18n react meta description
- Category
- JavaScript
- Title
- filter out arrays js
- Category
- JavaScript
- Title
- angularjs class directive prepend
- Category
- JavaScript
- Title
- how to access clipboard via js
- Category
- JavaScript
- Title
- Elements in iteration expect to have 'v-bind:key' directives
- Category
- JavaScript
- Title
- difference between foreach and map in js
- Category
- JavaScript
- Title
- how to remove session data on tab close in redux\
- Category
- JavaScript
- Title
- boucle foreach js
- Category
- JavaScript
- Title
- how to trigger an event on reload js
- Category
- JavaScript
- Title
- enum sequelize cli
- Category
- JavaScript
- Title
- format to currency javascript
- Category
- JavaScript
- Title
- deleteOne mongoose
- Category
- JavaScript
- Title
- cut string from string javascript
- Category
- JavaScript
- Title
- importing project images in react native
- Category
- JavaScript
- Title
- is react context better than redux
- Category
- JavaScript
- Title
- javascript click
- Category
- JavaScript
- Title
- how to get element by attribute value in javascript
- Category
- JavaScript
- Title
- date object javascript
- Category
- JavaScript
- Title
- enable disable click on div jquery
- Category
- JavaScript
- Title
- how to assign onEdit to specigfic tab
- Category
- JavaScript
- Title
- angular material theme colors
- Category
- JavaScript
- Title
- airbnb and eslint react native
- Category
- JavaScript
- Title
- discord.js clear code
- Category
- JavaScript
- Title
- get input value on keypress jquery
- Category
- JavaScript
- Title
- find particular object from array in js
- Category
- JavaScript
- Title
- ignore node modules
- Category
- JavaScript
- Title
- add two numbers javascript
- Category
- JavaScript
- Title
- javascript bootstrap ontab change
- Category
- JavaScript
- Title
- how to set height of material ui dialog react
- Category
- JavaScript
- Title
- get ip adress express
- Category
- JavaScript
- Title
- add value to array javascript
- Category
- JavaScript