yadcf dropdown filter only show data from current page of table, not from all page

yadcf dropdown filter only show data from current page of table, not from all page

eiaeia Posts: 1Questions: 1Answers: 0

i used yadcf filter for my datatable table. the options in dropdown selection is taken from my database. the problem now is that the options in dropdown only shows for data in the current page. i want the dropdown options to render all data from my database. another question, can i use external filter for 2 columns? for now i able to use external container filter for 1 column only.

Answers

  • ahampton09ahampton09 Posts: 1Questions: 0Answers: 0

    eia were you ever able to resolve this? I am having a similar problem. The dropdown is only populated with the column values for the current page when others exist.

  • daniel_rdaniel_r Posts: 460Questions: 4Answers: 67

    When using DT with server side config you MUST provide yadcf with the values of each filter (think about it - you populate your DT with values of one page only, how do you expect yadcf to know what values exist in the other pages) so look at the showcase page - Server side source example see code snippet at the bottom and inspect the dev tools and the network tab to see how I provide the needed data for yadcf filters (sending yadcf_data_0 / yadcf_data_1 / etc.. from server along with the DT data).

    As to the external filter for 2 columns? sure its possible see showcase - Multiple Columns and Tables 1.10.0 example

  • mr_sibsmr_sibs Posts: 2Questions: 0Answers: 0

    im also facing this problem right now.i had to use server side config to deal with more than 50K data. the problem is the column filter only populate data with the current page.
    what is the best options that i have to solve this problem?

  • daniel_rdaniel_r Posts: 460Questions: 4Answers: 67

    Read my answer just above your post

  • mr_sibsmr_sibs Posts: 2Questions: 0Answers: 0

    tq for your prompt feedback. i know that i have to provide the value for the column filter when using server side config. but this will be a manually adjustment to the coding every time new value being created. i prefer automatic populating value to column filter that can deals with more than 50K data smoothly. :-)

  • daniel_rdaniel_r Posts: 460Questions: 4Answers: 67

    On first load of your table, you should provide yadcf with all the possible values for each filter, now... if you add new values rows to table, that means you send that new row to server and reload your table based on updated data on server, so when you relaod your table , just make sure to relaod your filter related data (its up to your to maintain the filter data in an efficient way - append new values after new row addition / etc...) you can hold all the values in a map/set so all values will be unique.

This discussion has been closed.