Jets.js icon indicating copy to clipboard operation
Jets.js copied to clipboard

multiple search bars don't have unique properties

Open schwartzadev opened this issue 8 years ago • 3 comments

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>

schwartzadev avatar Mar 26 '17 19:03 schwartzadev

Hi At this moment only single instance allowed. Related to https://github.com/NeXTs/Jets.js/issues/18

NeXTs avatar Mar 27 '17 09:03 NeXTs

Hm. Thanks. Do you know of any workarounds or alternative services? Cheers

On Mar 27, 2017 3:59 AM, "Denis Lukov" [email protected] wrote:

Hi At this moment only single instance allowed. Related to #18 https://github.com/NeXTs/Jets.js/issues/18

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/NeXTs/Jets.js/issues/32#issuecomment-289408343, or mute the thread https://github.com/notifications/unsubscribe-auth/ARvsZecn3wh31TcCU3ovsdx92lCVYyTrks5rp4hqgaJpZM4MpkO8 .

schwartzadev avatar Mar 27 '17 13:03 schwartzadev

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

voltuer avatar May 05 '17 12:05 voltuer