Skip to content

Instantly share code, notes, and snippets.

@hinchley
Last active June 26, 2019 22:08
Show Gist options
  • Save hinchley/5973926 to your computer and use it in GitHub Desktop.
Save hinchley/5973926 to your computer and use it in GitHub Desktop.
Knockout.js Live Search Example
@pmrcunha
Copy link

pmrcunha commented Nov 9, 2015

@zhangtreefish, string.indexOf(param) returns the index of the first occurrence of param in string, and returns -1 if param can't be found in string.
Check it out here.
So basically what that line of code is saying is "if the string value exists in the string users[user].name, do something".

@ayushagnihotri24
Copy link

Mr. Hinchley,
Thank you for sharing this live search method. It is awesome! I have a question:

if i need to insert address field in it....it is inserted properly but while on searching it only search via name and id????

how to search it via address????

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment