1
0
mirror of https://github.com/DataTables/DataTables.git synced 2024-11-29 11:24:10 +01:00
DataTables/media
Allan Jardine 549bd19854 New: Optimised ID selectors - Also works when rows have not yet been rendered.
Being able to get and keep a reference to each row is quite important.
You can't use the DataTables row index for this as it can potentially
change, but we can use IDs, based on a unique value for each row in the
data - `dt-init rowId`.

I've made the decision to not require escaping of data in the ID. This
means that selectors can be ID selectors with a cobontation of other
things (#div.class for example) as that really doesn't make much sense
in this contact - you only have rows that you can select from. Not
requiring escaping makes both the client and library code much easier.
This is documented.

The implemention is to store a reference to each row's data object based
on its id allowing for a trivial lookup. The object has its own index
in the `aoData` array, so there is no `indexOf` required. The only
downside is that the index must be updated when a row is deleted. This
is done with a trivial for loop.
2015-07-06 21:05:27 +01:00
..
css Dev: Remove comments from SCSS file that are redundant 2015-06-10 09:47:44 +01:00
images Dev: Remove old images that are no longer used (haven't been since 1.9) 2015-03-19 12:00:33 +00:00
js New: Optimised ID selectors - Also works when rows have not yet been rendered. 2015-07-06 21:05:27 +01:00
unit_testing Test file 2014-05-01 11:50:51 +01:00