Skip to content

Commit

Permalink
Don't require observable for doc filter #2880
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisala committed Nov 5, 2024
1 parent eee9278 commit 65afdcb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion grails-app/assets/javascripts/fieldcapture-application.js
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,8 @@ function Documents(options) {
var lcFilter = (self.documentFilter() || '').trim().toLowerCase();
var field = self.documentFilterField();
return ko.utils.arrayFilter(self.documents(), function(doc) {
return (doc[field.fun]() || '').toLowerCase().indexOf(lcFilter) !== -1;
var docValue = ko.utils.unwrapObservable(doc[field.fun]);
return (docValue || '').toLowerCase().indexOf(lcFilter) !== -1;
});
});

Expand Down

0 comments on commit 65afdcb

Please sign in to comment.