title: Search data on click event of button using smart table
body: <p>I am very new to the smart table. I have gone through its documentation on <a href="http://lorenzofox3.github.io/smart-table-website/" rel="nofollow noreferrer">Smart Table</a>.
  But the I haven't found how to bind data on click event in smart table?
  Code is very big but I am trying to post it here.</p>
  <pre class="lang-html prettyprint-override"><code>&lt;div class=&quot;table-scroll-x&quot; st-table=&quot;backlinksData&quot; st-safe-src=&quot;backlinks&quot; st-set-filter=&quot;myStrictFilter&quot;&gt;
    &lt;div class=&quot;crawlhealthshowcontent&quot;&gt;
      &lt;div class=&quot;crawlhealthshowcontent-right&quot;&gt;
        &lt;input type=&quot;text&quot; class=&quot;crserachinput&quot; placeholder=&quot;My URL&quot; st-search=&quot;{{TargetUrl}}&quot; /&gt;
        &lt;a class=&quot;bluebtn&quot;&gt;Search&lt;/a&gt;
      &lt;/div&gt;
      &lt;div class=&quot;clearfix&quot;&gt;&lt;/div&gt;
    &lt;/div&gt;
    &lt;br /&gt;
    &lt;div class=&quot;table-header clearfix&quot;&gt;
      &lt;div class=&quot;row&quot;&gt;
        &lt;div class=&quot;col-sm-6_5&quot;&gt;
          &lt;div st-sort=&quot;SourceUrl&quot; st-skip-natural=&quot;true&quot;&gt;
            Page URL
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class=&quot;col-sm-2&quot;&gt;
          &lt;div st-sort=&quot;SourceAnchor&quot; st-skip-natural=&quot;true&quot;&gt;
            Anchor Text
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class=&quot;col-sm-1&quot;&gt;
          &lt;div st-sort=&quot;ExternalLinksCount&quot; st-skip-natural=&quot;true&quot;&gt;
            External&lt;br /&gt;Links
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class=&quot;col-sm-1&quot;&gt;
          &lt;div st-sort=&quot;InternalLinksCount&quot; st-skip-natural=&quot;true&quot;&gt;
            Internal&lt;br /&gt;Links
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class=&quot;col-sm-1&quot;&gt;
          &lt;div st-sort=&quot;IsFollow&quot; st-skip-natural=&quot;true&quot;&gt;
            Type
          &lt;/div&gt;
        &lt;/div&gt;
  
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class=&quot;table-body clearfix&quot;&gt;
      &lt;div class=&quot;row&quot; ng-repeat=&quot;backlink in backlinksData&quot; ng-if=&quot;backlinks.length &gt; 0&quot;&gt;
        &lt;div class=&quot;col-sm-6_5&quot;&gt;
          &lt;div class=&quot;pos-rel&quot;&gt;
            &lt;span class=&quot;display-inline wrapWord&quot; tool-tip=&quot;{{ backlink.SourceUrl }}&quot;&gt;&lt;b&gt;Backlink source:&lt;/b&gt; &lt;a target=&quot;_blank&quot; href=&quot;{{backlink.SourceUrl}}&quot;&gt;{{ backlink.SourceUrl }}&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
            &lt;span class=&quot;display-inline wrapWord&quot; tool-tip=&quot;{{ backlink.SourceTitle }}&quot;&gt;&lt;b&gt;Link description:&lt;/b&gt; {{ backlink.SourceTitle }}&lt;/span&gt; &lt;br /&gt;
            &lt;span class=&quot;display-inline wrapWord&quot; tool-tip=&quot;{{ backlink.TargetUrl }}&quot;&gt;&lt;b&gt;My URL:&lt;/b&gt; &lt;a target=&quot;_blank&quot; href=&quot;{{backlink.TargetUrl}}&quot;&gt;{{ backlink.TargetUrl }}&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class=&quot;col-sm-2&quot;&gt;
          &lt;div class=&quot;pos-rel&quot;&gt;
            {{ backlink.SourceAnchor }}
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class=&quot;col-sm-1&quot;&gt;
          &lt;div&gt;
            {{ backlink.ExternalLinksCount }}
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class=&quot;col-sm-1&quot;&gt;
          &lt;div&gt;
            {{ backlink.InternalLinksCount }}
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class=&quot;col-sm-1&quot;&gt;
          &lt;div ng-if=&quot;!backlink.IsFollow&quot;&gt;
            No Follow
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class=&quot;row&quot; ng-if=&quot;backlinks.length == 0&quot;&gt;
        No backlinks exists for selected location.
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class=&quot;pos-rel&quot; st-pagination=&quot;&quot; st-displayed-pages=&quot;10&quot; st-template=&quot;Home/PaginationCustom&quot;&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p>and my js code is here.</p>
  <pre class="lang-js prettyprint-override"><code>module.controller('backlinksController', [
    '$scope','$filter', 'mcatSharedDataService', 'globalVariables', 'backlinksService',
    function ($scope,$filter, mcatSharedDataService, globalVariables, backlinksService) {
  
      $scope.dataExistsValues = globalVariables.dataExistsValues;
  
      var initialize = function () {
        $scope.backlinks = undefined;
        $scope.sortOrderAsc = true;
        $scope.sortColumnIndex = 0;
  
      };
  
      initialize();
  
      $scope.itemsByPage = 5;
  
      var updateTableStartPage = function () {
        // clear table before loading
        $scope.backlinks = [];
        // end clear table before loading
  
        updateTableData();
      };
  
      var updateTableData = function () {
  
        var property = mcatSharedDataService.PropertyDetails();
        if (property == undefined || property.Primary == null || property.Primary == undefined || property.Primary.PropertyId &lt;= 0) {
          return;
        }
        var params = {
          PropertyId: property.Primary.PropertyId
        };
  
        var backLinksDataPromise = backlinksService.getBackLinksData($scope, params);
  
        $scope.Loading = backLinksDataPromise;
      };
  
      mcatSharedDataService.subscribeCustomerLocationsChanged($scope, updateTableStartPage);
    }
  ]);
  module.filter('myStrictFilter', function ($filter) {
    return function (input, predicate) {
      return $filter('filter')(input, predicate, true);
    }
  });
  </code></pre>
  <p>But It is working fine with the direct search on textbox.
  but according to the requirement I have to perform it on button click.
  Your suggestions and help would be appreciated.
  Thanks in advance.</p>