Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transform method not hit in .getData #56

Open
ghost opened this issue May 13, 2016 · 1 comment
Open

Transform method not hit in .getData #56

ghost opened this issue May 13, 2016 · 1 comment

Comments

@ghost
Copy link

ghost commented May 13, 2016

Greetings! I'm working through your example (thank you) however running into problems getting the transform to fire.

The docTransform hits every time. But never the transform.

Any ideas?

`Template.SearchResults.helpers({
offender: function() {

return OffenderSearch.getData({
  transform: function (matchText, regExp) {
    console.log('hit transform');
    return matchText.replace(regExp, "<b>$&</b>");
  },

  docTransform: function(doc) {
    console.log('hit docTransform');
    return doc;
  }
});

}`

@s4admin
Copy link

s4admin commented Sep 14, 2016

You have to pass in a list of fields on the client side for it to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant