Select info(api) ignores ctx._select.items
Select info(api) ignores ctx._select.items
SOLID-T
Posts: 3Questions: 2Answers: 0
Select info(api) ignores ctx._select.items
It seems that select extension is ignoring items option.
* Included libraries:
* JSZip 3.10.1, DataTables 1.13.5, Editor 2.2.0, AutoFill 2.6.0, Buttons 2.4.1, Column visibility 2.4.1, HTML5 export 2.4.1, DateTime 1.5.1, FixedColumns 4.3.0, FixedHeader 3.4.0, RowReorder 1.4.0, Scroller 2.2.0, Select 1.7.0, StateRestore 1.3.0
Config is
select: {
"style": "multi",
"items": "row",
"selector": "td:first-child"
}
Expected behaviour: only show information about selected rows.
Current behaviour: always show information about selected rows, columns and cells.
I changed "add" to
var add = function (el, name, num) {
if(ctx._select.items === null || ctx._select.items === name){
el.append(
$('<span class="select-item"/>').append(
api.i18n(
'select.' + name + 's',
{ _: '%d ' + name + 's selected', 0: '', 1: '1 ' + name + ' selected' },
num
)
)
);
}
};
That seems to work.
Answers
I don't quite understand I'm afraid. Can you link to a page showing the issue please?
I've just created this little test case using your Select configuration from above, and it doesn't show anything about the columns or cells. So there must be something else I'm missing. A test case would help resolve that.
Allan
May be it 's because it is in a combination with a checkbox and ajax load. I'll try to get a test case online.