Opened 14 years ago
Closed 14 years ago
#2081 closed enhancement (duplicate)
FilteringTable: onAddData fires also if the data in the store are replaced
Reported by: | guest | Owned by: | Tom Trenka |
---|---|---|---|
Priority: | high | Milestone: | 0.9 |
Component: | Widgets | Version: | 0.4.1 |
Keywords: | Cc: | [email protected]… | |
Blocked By: | Blocking: |
Description
If the data in the store are replaced with a new objekt (but the same key) the event onAddData will fire - that's ok. The FilteringTable?-Widget should be aware of this. Attached is a patch that solved the problem in this special case.
Attachments (2)
Change History (8)
Changed 14 years ago by
Attachment: | patch.patch added |
---|
comment:1 Changed 14 years ago by
Owner: | changed from bill to Tom Trenka |
---|
comment:2 Changed 14 years ago by
Milestone: | → 0.9 |
---|---|
Version: | → 0.4.1 |
comment:3 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 Changed 14 years ago by
Resolution: | → fixed |
---|
comment:5 Changed 14 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
It is still broken, at least in FireFox? 2.x. Note that dojo.collections.Store.onUpdateData takes the Store entry as a parameter, which has the stored data available as .src property, however getRow() in FilteringTable? compares the real data object.
For performance (and easier to understand code IMHO) it might be the best to compare the row key value against the key directly, instead of going the indirect way by comparing data objects.
I'm going to attach a patch (against r7337) that fixes the problem for me and changes to comparing keys directly. There are some other places that also might be switched to the new getRowByKey method, however I'm leaving them alone for now and only fix the bug at hand.
comment:6 Changed 14 years ago by
Resolution: | → duplicate |
---|---|
Status: | reopened → closed |
Your reopening is a dupe of #2469. Closing in favor of that.
(In [7319]) Fixes #2081 by creating new events on the Store and adding new handlers on the FilteringTable? widget.