This website requires JavaScript.
Explore
Help
Register
Sign In
rooty
/
DataTables
Watch
1
Star
0
Fork
0
You've already forked DataTables
mirror of
https://github.com/DataTables/DataTables.git
synced
2025-01-19 12:52:11 +01:00
Code
Issues
Releases
Activity
DataTables
/
.datatables-commit-sync
2 lines
41 B
Plaintext
Raw
Normal View
History
Unescape
Escape
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
bbf60cb061faab9f34b9db46948f25e9ee75dce7
Reference in New Issue
Copy Permalink