Opened 6 years ago

Closed 4 years ago

#17642 closed defect (patchwelcome)

Observable cannot properly report the position of objects added using the before option

Reported by: Sebastien Brunot Owned by: Kris Zyp
Priority: undecided Milestone: 1.11
Component: Data Version: 1.9.2
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by Sebastien Brunot)

When a Store is wrapped into an Observable, and its add method is called with a non null before parameter in the options (for a store that supports ordering of its elements), the new position of the added element cannot be reported to the observer.

It seems that the issue is a design issue: when calling add, the observable rely on the queryExecutor to order the added element in the query result. The problem is that the queryExecutor has no information about the options provided to the add method, and thus cannot use the value of the before parameter to calculate its result.

Change History (3)

comment:1 Changed 6 years ago by cjolif

Component: GeneralData
Owner: set to Kris Zyp
Status: newassigned

comment:2 Changed 6 years ago by Sebastien Brunot

Description: modified (diff)
Summary: Observable does not properly report the position of objects added using the before optionObservable cannot properly report the position of objects added using the before option

comment:3 Changed 4 years ago by dylan

Milestone: tbd1.11
Resolution: patchwelcome
Status: assignedclosed

Will consider for dstore. Would accept a pull request to fix this for dojo/store.

Note: See TracTickets for help on using tickets.