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

No idea how to make filter outside table #35

Open
AkshayChan opened this issue Jun 29, 2018 · 1 comment
Open

No idea how to make filter outside table #35

AkshayChan opened this issue Jun 29, 2018 · 1 comment
Labels

Comments

@AkshayChan
Copy link

AkshayChan commented Jun 29, 2018

Hello,

I have no clue about how to use my filter outside the table. I have created a select element

  <select id="ASIN" class= "custom-select">
    <!--
    <option>ASIN</option>
    <option>B0000934FH</option>
    <option>B00009ABCD</option>
    <option>B00009HYTD</option>
    -->
  </select>

This is what I'm trying to do

filters: {
_1 : { element : $("#ASIN"), values : {0: "B0000934FH", 1: "B00009HYTD"} },

I don't have an id for the column and ASIN is the id for my select element.

Please help

Thanks

@Holt59 Holt59 added the question label Jul 2, 2018
@Holt59
Copy link
Owner

Holt59 commented Jul 2, 2018

I can't really help you if I don't know what your data looks like. If you don't have an id for the column, you likely have a column number (e.g., you want to filter the second column).

Also, the filtering is done on the key of the values object, so you should rather do something like:

filters: [
    2: { element: $("#ASIN"), values: { B0000934FH: "B0000934FH", ... }
}

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

No branches or pull requests

2 participants