Skip to content

Instantly share code, notes, and snippets.

@Dionid
Created July 23, 2016 19:15
Show Gist options
  • Save Dionid/d0b80e0d6cd5910e69f8f24720cae963 to your computer and use it in GitHub Desktop.
Save Dionid/d0b80e0d6cd5910e69f8f24720cae963 to your computer and use it in GitHub Desktop.
findActiveInput(input:ISearchInput){
let res,
actInpt = undefined;
// Функция .forEach синхронная
res = this.activeInputs.forEach((inp) => {
console.log(inp);
// inp почему-то array а не отдельный элемент массива activeInputs
inp.forEach(inputt =>{
if(inputt === input){
actInpt = inp;
}
});
});
}
return actInpt;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment