Hello. One of the information contained in the data collection is the "ID" of the user who writes the data to the data collection.
Using the code:
{key: 'osobaKolegiumId', label: 'Uczestnik kolegium', tmpl: Template._userUczestniczacyKolegium}
Displaying the value of the template "_userUczestniczacyKolegium"
The problem is that the built-in filter package "Reactive Table" does not filter data on the basis of the information contained in the template "_userUczestniczacyKolegium"
html file:
<template name="_userUczestniczacyKolegium"> {{author}} </template>
js file:
import { Meteor } from meteor/meteor;
import { Template } from meteor/templating;
import ./_user-uczestniczacy-kolegium.html;
Template._userUczestniczacyKolegium.onCreated( () => {
Template.instance().subscribe( 'usersProfile' );
});
Template._userUczestniczacyKolegium.helpers({
author: function () {
var osobaKolegiumId = Meteor.users.findOne({ _id: this.osobaKolegiumId });
return osobaKolegiumId.username;
}
});
You're right, this package can only filter on data in the original collection. You'd have to change your data so that the username is in the user profile if you want to filter based on that.
Hello. One of the information contained in the data collection is the "ID" of the user who writes the data to the data collection. Using the code:
{key: 'osobaKolegiumId', label: 'Uczestnik kolegium', tmpl: Template._userUczestniczacyKolegium}
Displaying the value of the template "_userUczestniczacyKolegium"
The problem is that the built-in filter package "Reactive Table" does not filter data on the basis of the information contained in the template "_userUczestniczacyKolegium"
html file:
<template name="_userUczestniczacyKolegium"> {{author}} </template>
js file: