Comments (2)
This is possible, what you want to do is something like:
filters: {
_1: function (data, text) {
for (var i = 0; i < data.length; ++i) {
// text is always uppercase, you can obviously perform different checks.
if (new String(data[i]).toUpperCase().indexOf(text) !== -1) {
return true;
}
}
return false;
}
}
The _1
key is what you want here for the lambda, this should give you an input filter on the first column. The easiest way if you want to move it / make it span multiple column is to do it after the datatable via JS. data
will contains the whole row, which in your case is a standard JS array.
I cannot test this code right now, so it may not work out-of-the-box, but you get the idea! Feel free to ask if you need more information.
from datatable.
Thank you very much for your reply and solution. I did, however, write my own search function in the meantime that iterates the entire data array, re-assigns it to the table's data array, refreshes the table, and then resets the per page option. It seems to work fine...
from datatable.
Related Issues (20)
- Inject data to table row HOT 4
- Nullpointer Exception table with filter and no data
- Not working on my project :( HOT 6
- CSS not work HOT 4
- Extract filtered records HOT 11
- Filter outside the table HOT 2
- No idea how to make filter outside table HOT 1
- Get number of a table row. HOT 6
- Update table data HOT 19
- Process Ajax Data Before Displaying on Table! HOT 3
- Using Filter/Sort with hidden child rows HOT 3
- Was cleared all attributes from td. HOT 1
- Click in a row event HOT 3
- Filter by date mm/dd/yyyy HOT 1
- Ajax Doesn't Work HOT 4
- filter is not function after apply addRows HOT 2
- Table reload method HOT 2
- how can i implement for rowspan ? HOT 3
- how to set default page ? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datatable.