ng grid -- How I can hide the filter text bar -
based in example hide filter texbox , make appear after double click column name.
where start?? :) thanks.
edit:
thanks advice of mainguy able complete example http://plnkr.co/edit/euslvib5pokjaae2ucml?p=preview
you can (watch out variable fv
(short filtervisible):
change input in headertemplate
<input type="text" ng-show="fv" ng-click="stopclickprop($event)" placeholder="filter..." ng-model="col.filtertext" ng-style="{ 'width' : col.width - 14 + 'px' }" style="position: absolute; top: 30px; bottom: 30px; left: 0; bottom:0;"/>
add fv
controllers scope.
$scope.fv=false; //initially closed
add toogle function fv
in ondoubleclick handler of nggriddoubleclick plugin.
self.scope.$parent.fv=!self.scope.$parent.fv;
here plunker. not perfect because have find way adjust sizes may give hint on how proceed.
Comments
Post a Comment