From 56d9de688327c1b0e623fcaea7a2bf87397e5ef6 Mon Sep 17 00:00:00 2001 From: "Kenneth G. Franqueiro" Date: Thu, 8 Aug 2013 15:39:26 -0400 Subject: [PATCH] Fix #693: _StoreMixin: Run inherited newRow before removing noDataNode --- CHANGES.md | 2 ++ _StoreMixin.js | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 0ab1d4729..ff837fb37 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -11,6 +11,8 @@ This document outlines changes since 0.3.0. For older changelogs, see the reference the correct path where intern-geezer installs to as of Intern 1.2. * Fixed a regression in `_StoreMixin` (affecting `OnDemandList` and `Pagination`) where setting `store` to `null` would cause an error. (#688, thanks kilink) +* Fixed a regression in `_StoreMixin` which caused an error when updating the + only row present in a list or grid. (#693) ### Extensions diff --git a/_StoreMixin.js b/_StoreMixin.js index 42438fbad..c7275a10d 100644 --- a/_StoreMixin.js +++ b/_StoreMixin.js @@ -326,11 +326,14 @@ function(kernel, declare, lang, Deferred, listen, aspect, put){ newRow: function(){ // Override to remove no data message when a new row appears. + // Run inherited logic first to prevent confusion due to noDataNode + // no longer being present as a sibling. + var row = this.inherited(arguments); if(this.noDataNode){ put(this.noDataNode, "!"); delete this.noDataNode; } - return this.inherited(arguments); + return row; }, removeRow: function(rowElement, justCleanup){ var row = {element: rowElement};