You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dear @tybeck,
I really like what you got here, but it looks like I can't make it work as expected.
I wrote the directive down inside the controller template like this:
and inside the controller I basically pasted pretty much everything about the example:
varvm=this;vm.sOptions={};vm.sFilters=[{'name': 'folder','displayName': 'folder','root': 'Column','suggestedValues': ['Test folder','asd','asd1','asd2'],'restrictedSuggestedValues': true,'multi': true//, 'notFiltered': true},{'name': 'name','displayName': 'Name','root': 'Column'},{'name': 'desc','displayName': 'Desc','root': 'Column'},{'name': 'output','displayName': 'Output','suggestedValues': ['(*.xls)','(*.mdb)','(*.txt)','(*.xml)'],'restrictedSuggestedValues': true,'root': 'Column'},{'name': 'model','displayName': 'Model','suggestedValues': ['yes','no'],'restrictedSuggestedValues': true,'root': 'Column'},{'name': 'pubblic','displayName': 'Pubblic','suggestedValues': ['yes','no'],'restrictedSuggestedValues': true,'root': 'Column'},{'name': 'editing','displayName': 'Editing','suggestedValues': ['yes','no'],'restrictedSuggestedValues': true,'root': 'Column'},{'name': 'type','displayName': 'Type','suggestedValues': ['C','R','T','U','C'],'restrictedSuggestedValues': true,'root': 'Column'}];$scope.$on('onRegisterApi',function(ev,api){console.log('api',api);varchange=function(ev,params){console.log(ev,params,'params');};api.on('onChange',change).on('onQueryAdded',function(ev,query){console.log(ev,'query:',query);}).on('onEnteredEditMode',function(ev,filter){console.log(ev,'edit',filter);}).on('onLeavedEditMode',function(ev,filter){console.log(ev,'leave',filter);});api.on('onQueryRemoved',function(ev,query){console.log(ev,'removed query:',query);});api.on('onQueryChanged',function(ev,query){console.log(ev,'changed query:',query);});api.on('onEraser',function(ev){console.log(ev,'erased');});api.on('onGarbage',function(ev){console.log(ev,'garbage');});api.on('onFilterAdded',function(ev,filter){console.log(ev,'added filter',filter);});api.on('onFilterRemoved',function(ev,filter){console.log(ev,'removed filter',filter);});api.on('onFilterChanged',function(ev,filter){console.log(ev,'changed filter',filter);});api.on('onOperatorChanged',function(ev,op){console.log(ev,'changed operator',op);});api.on('onFilterSelectorChanged',function(ev,sel){console.log(ev,'changed selector',sel);});api.off('onchange');});vm.sConfig={'delay': 1000,/* How long before paasb fires off a change event */'showMagnifierAlways': false,/* Should we keep magnifier or remove it when there is some sort of query/filter? */'placeholders': ['Click here to start a visual search']};vm.sFilterOperators=[{"name": "NOT"},{"name": "AND","selected": true},{"name": "OR"}];vm.sFilterSelectors=[{"name": "Contains","key": "contains","selected": true,"notAllowed": ["restrictedSuggestedValues"]},{"name": "Does not contain","key": "doesNotContain","notAllowed": ["restrictedSuggestedValues"]},{"name": "Is Equal To","key": "isEqualTo"},{"name": "Is Not Equal To","key": "isNotEqualTo"},{"name": "Starts with","key": "startsWith"},{"name": "Ends with","key": "endsWith"},{"name": "Similiarity","key": "similiarity"}];
But when I click the filter button no row is shown, and taking a look at the console I saw no error thrown; taking a look to the HTML elements, I found inside the ng-repeat in charge to render the possible filters no one of its rows satisfies the ng-if="filter.notFiltered" condition, thus they are all out of the DOM.
Finally, inspecting the filters array, this property is missing in every filter object.
Please help me find what am I doing wrong.
Thank you in advance
The text was updated successfully, but these errors were encountered:
Dear @tybeck,
I really like what you got here, but it looks like I can't make it work as expected.
I wrote the directive down inside the controller template like this:
and inside the controller I basically pasted pretty much everything about the example:
But when I click the filter button no row is shown, and taking a look at the console I saw no error thrown; taking a look to the HTML elements, I found inside the ng-repeat in charge to render the possible filters no one of its rows satisfies the
ng-if="filter.notFiltered"
condition, thus they are all out of the DOM.Finally, inspecting the filters array, this property is missing in every filter object.
Please help me find what am I doing wrong.
Thank you in advance
The text was updated successfully, but these errors were encountered: