LumaPictures / meteor-jquery-datatables

Sort, page, and filter millions of records reactively.
http://jquery-datatables.meteor.com
MIT License
98 stars 29 forks source link

Are all datatables options supported? #43

Open serenitus opened 10 years ago

serenitus commented 10 years ago

I have the following:

Template.noticesSearch.notices = function () {
    return {
        id: 'notices-table',
        columns: [{
            title: 'Date',
            data: 'noticedate',
            mRender: function (data, type, row) {
                return moment(row.noticedate).format('DD/MM/YYYY');
            }
        }, {
            title: 'Died on',
            data: 'diedon',
            mRender: function (data, type, row) {
                return moment(row.diedon).format('DD/MM/YYYY');
            }
        },{
            title: 'Family name',
            data: 'familyname'
        },{
            title: 'First names',
            data: 'firstnames'
        },{
            title: 'Estate value',
            data: 'estatevalue',
            mRender: function (data, type, row) {
                return accounting.formatMoney(row.estatevalue, '£ ', 0);;
            }
        }],
        subscription: 'all_notices',
        options: {
            order: [0, 'desc'],
            searching: false
        }
    }
};

Adding the 'searching' option results in an error in the JS console:

Uncaught TypeError: Cannot read property 'value' of undefined Query.mixin.coffee:86include.mapTableState Query.mixin.coffee:86
DataTableComponent.fnServerData DataTables.component.coffee:56
later underscore.js:731

I was led to believe, from the datatable docs, that this option would allow me to suppress the live search/filter box.

gjolund commented 10 years ago

Do you know if searching was recently implemented?

Typically how I remove the search filter box is my using the dom property.

serenitus commented 10 years ago

Aha. Good to see you back round these parts :)

Not sure. I used some CSS in the end but I'll look at the dom property if that's a better way.

gjolund commented 10 years ago

Yeah I was out sick for a minute.

Another probably culprit is that Allan has been updating the core datatables library docs, making them out of sync with the version of datatables that I am using.

You may want to try replacing the library with the current version in your app, its stored in the vendor directory

On Thu, Jun 26, 2014 at 4:28 PM, serenitus notifications@github.com wrote:

Aha. Good to see you back round these parts :)

Not sure. I used some CSS in the end but I'll look at the dom property if that's a better way.

— Reply to this email directly or view it on GitHub https://github.com/LumaPictures/meteor-jquery-datatables/issues/43#issuecomment-47292666 .

serenitus commented 10 years ago

Took a look. The version I have is 1.10 which appears to be the latest. Have I misunderstood your suggestion?

dandv commented 10 years ago

:+1: for removing the filter box.