Fix sort operator

* Add server publications for next and previous page
* Add ability to sort ascending or descending
This commit is contained in:
John R. Supplee 2021-02-25 18:38:51 +02:00
parent 250e79f53c
commit 43f40c4085
5 changed files with 239 additions and 174 deletions

View file

@ -117,7 +117,7 @@ CardComments.textSearch = (userId, textArray) => {
};
for (const text of textArray) {
selector.$and.push({ text: new RegExp(escapeForRegex(text)) });
selector.$and.push({ text: new RegExp(escapeForRegex(text), 'i') });
}
// eslint-disable-next-line no-console

View file

@ -62,6 +62,12 @@ SessionData.attachSchema(
optional: true,
blackbox: true,
},
projection: {
type: String,
optional: true,
blackbox: true,
defaultValue: {},
},
errorMessages: {
type: [String],
optional: true,
@ -130,6 +136,9 @@ SessionData.helpers({
getSelector() {
return SessionData.unpickle(this.selector);
},
getProjection() {
return SessionData.unpickle(this.projection);
},
});
SessionData.unpickle = pickle => {