vedmack/yadcf

Error when using orthogonal data and text_data_delimiter (support columns.data.filter)

Closed this issue · 7 comments

There's an error if you use an ajax source and specify an object for the data attribute as per the datatables orthogonal data documentation and use the text_data_delimiter delimiter as well. I believe the error in the console is TypeError: data[j]._aData[column_number_filter] is undefined.

Here's a jsfiddle with an indication of the problem. https://jsfiddle.net/y2ghwpbs/1/

Hi

You can init the columns like that: var columns = [{"data": "name"}]; and it will work with yadcf

see it working

True. But I would like to have a different property to be used for the display value and a different property for the filter value. This syntax is supported by datatables, but errors with yadcf, e.g.

var columns = [
	{ data: {
		_: "name",
		filter: "nameFilter"
		}
	}
]

@tanyona It doesn't work like this (tested in you example page without yadcf)
please provide a working example in the desired format e.g _: "name", filter: "nameFilter"

Here's an example - https://jsfiddle.net/7k9zmsLo/

It doesn't use the yadcf filter. The datatables search filters according to the "nameFilter" property of the data.

@tanyona please post the relevant docs of this feature from datatables

fixed in 0.9.4.beta.18 (located in src folder)