Description
Using Meteor I implemented a pretty basic rubaxa:sortable instance. Not using multiple sortable lists or anything fancy. Pre-loaded "order" data in my Mongo Collection with unique numbers 1, 2, 3, etc.
Everything displays fine, and lets you sort once then the package dies when it tries to save the new order to the DB.
Error in the browser console is:
TypeError: templateInstance.collection.findOne is not a function. (In 'templateInstance.collection.findOne(itemId)', 'templateInstance.collection.findOne' is undefined) adjustOrdersrubaxa_sortable.js:1404 sortableUpdaterubaxa_sortable.js:1446 _dispatchEventrubaxa_sortable.js:1102 _onDroprubaxa_sortable.js:799 (anonymous function) handleEventrubaxa_sortable.js:853
Relevant code snippets below...
Server:
Products = new Mongo.Collection('products'); Sortable.collections = ['products'];
Client:
<div class="sortable target" id="object"> {{#sortable items=products animation="100" handle=".sortable-handle" ghostClass="sortable-ghost" sortField="order"}} {{> productSettingsRow}} {{/sortable}} </div>
`
Tried searching the Issues; don't see anything quite like this though #578 seems similar(?). Also didn't see a way to recreate in the JS scratchpad as requested since it has to do with DB access...
Any suggestions, or any other info I can provide to help debug?