simpleddp icon indicating copy to clipboard operation
simpleddp copied to clipboard

ddpCollection.reactive() doesn't accept { sort }

Open fixmaker opened this issue 4 years ago • 1 comments

Hello, and thanks for a great library!

Although the documentation implies that the following should be possible:

server.collection('widgets').reactive({ sort: mySortFunc })

It appears that the sort function is being ignored. After investigating and running some traces on the code, it looks like it's not being set at all. The constructor of ddpReactiveCollection doesn't process the sort property.

This isn't a major problem since I can rewrite the code above as follows:

server.collection('widgets').reactive().sort(mySortFunc)

...and it works as expected. But either the documentation should probably be updated, or the code fixed to work as documented.

fixmaker avatar Sep 10 '19 12:09 fixmaker

Hello, @fixmaker. Thanks for your review! I'll correct the code soon.

Gregivy avatar Sep 21 '19 03:09 Gregivy