Dismiss
Announcing Stack Overflow Documentation

We started with Q&A. Technical documentation is next, and we need your help.

Whether you're a beginner or an experienced developer, you can contribute.

Sign up and start helping → Learn more about Documentation →

i use datatables in angular. And set .withColumnFilter for filtering tables.

.withColumnFilter({
                aoColumns: [
                    null,
                    {
                        type: 'select',
                        bRegex: false,
                        values: function (aoData, oSettings) {
                            var keys = new Array();
                            var values = new Array()
                            for (i = 0; i < aoData.length; i++) {
                                var item = aoData[i]._aData[3];
                                if (keys[item] == null) {
                                    keys[item] = true;
                                    //values.push(item);
                                    values.push({value: item, label: 'The ' + item});
                                }}
                            return values;
                        }}]
                     });

Select list is populate with data from table, and its ok. But after came back, in select list, on first line is list of all array, inline. Here is image how this look enter image description here

Thnx

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.