Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple search bars don't have unique properties #32

Open
schwartzadev opened this issue Mar 26, 2017 · 3 comments
Open

multiple search bars don't have unique properties #32

schwartzadev opened this issue Mar 26, 2017 · 3 comments

Comments

@schwartzadev
Copy link

schwartzadev commented Mar 26, 2017

I have a table of data that I want to be able to search by two columns at once.
See the table here.

It seems like this depends on the properties of the first jets object since either way, the second object has the same props as the first.

Code:

...
<h4 for="jetsSearch">Search with your 2 letter state abbreviation:</h4>
<div class="input-group">
  <span class="input-group-addon" id="basic-addon3">State: </span>
  <input type="search" id="stateSearch" class="form-control" placeholder="NY">
<h4 for="nameSearch">Search by representative name:</h4>
</div>
<h4 for="nameSearch">Search by representative name:</h4>
<div class="input-group">
  <span class="input-group-addon" id="basic-addon3">Name: </span>
  <input type="search" id="nameSearch" class="form-control" placeholder="Maria">
</div>

...

<script type="text/javascript">
  var jets = new Jets({ // searches column 2, containing state codes
  searchTag: '#stateSearch',
  contentTag: '#jetsContent',
  columns: [2]
});

  var jets2 = new Jets({ // expected: search col 1, containing names
  searchTag: '#nameSearch', // actual: searches col 2, same config as above.
  contentTag: '#jetsContent',
  columns: [1]
});
</script>
@NeXTs
Copy link
Owner

NeXTs commented Mar 27, 2017

Hi
At this moment only single instance allowed.
Related to #18

@schwartzadev
Copy link
Author

schwartzadev commented Mar 27, 2017 via email

@voltuer
Copy link

voltuer commented May 5, 2017

can I make it multi instance and make a pull request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants