From 38077fa6e864ddbb6b66ba2cd4723f6d18800305 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Thu, 5 Dec 2013 11:37:16 +0100 Subject: [PATCH] =?utf8?q?no=20need=20to=20explicitly=20add=20an=20?= =?utf8?q?=E2=80=98id=E2=80=99=20field=20in=20records,=20just=20tell=20dat?= =?utf8?q?aview=20to=20use=20this.key?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- plugins/querytable/static/js/querytable.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/querytable/static/js/querytable.js b/plugins/querytable/static/js/querytable.js index e927c93b..8712e523 100644 --- a/plugins/querytable/static/js/querytable.js +++ b/plugins/querytable/static/js/querytable.js @@ -154,8 +154,6 @@ }, new_record: function(record) { - // xxx having a field named 'id' is a requirement from dataview - record['id']=record[this.key]; this.slick_data.push(record); }, @@ -354,7 +352,8 @@ on_all_query_done: function() { if (debug) messages.debug("1-shot initializing dataTables content with " + this.slick_data.length + " lines"); var start=new Date(); - this.slick_dataview.setItems (this.slick_data); + // use this.key as the key for identifying rows + this.slick_dataview.setItems (this.slick_data, this.key); var duration=new Date()-start; if (debug) messages.debug("setItems " + duration + " ms"); if (debug_deep) { -- 2.43.0