Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 239 Vote(s) - 3.55 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to filter from external input and startswith?

#1
I'm trying to filter a table content with tablesorter applying two filters at the same time, but the table is not being filtered with filter_startswith when the "filtertext" is being taken from an external input.

The startswith filter works fine when the "filtertext" is from columnFilters, but with the external input the filter works but ignores the startswith filter.

From the source example I added the external input to filter, the rest is almost the same.

Is this an expected behavior or can it be called a bug/error/problem with the widget?
How can I make what I want? (filter the table from an external input but with the startswith filter)

Source example:

[To see links please register here]

Reply

#2
I set up [this example](

[To see links please register here]

) with the `filter_startsWith` option set to `true` and it appears to work when I try to filter the first name column for "a"; the only results I see are "Aaron" and "Alex", not "Philip Aaron" or "Martha".

$(function() {

$('table').tablesorter({
theme: 'blue',
widgets: ['filter'],
widgetOptions : {
filter_external : '.search',
filter_startsWith: true,
filter_reset: '.reset'
}
});

});

If this isn't working for you, then please modify the demo to show the problem so I can help troubleshoot it.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through