Using svelte with rdb:svelte-meteor-data
I have a simple collection called DictQuery which is published by the server, returning all records with all fields. The client subscribes to that publication.
What I want is a list of the query field only, sorted alphabetically. On the client side, I’m doing this:
$: savedSearches =
useTracker(() =>
DictQuery.find(
{},
{ fields: { query: 1 } },
{ sort: { query: 1 } }
).fetch()
)
This returns the query fields only, but not sorted alphabetically.
If I comment out the “{ fields: { query: 1 } }”, line, all fields are returned, but the list IS sorted alphabetically.
So it’s like I have the syntax right, but the “fields” restriction is stopping the sort from working.
I have no idea if this is a Svelte or a Meteor collection issue - any ideas?