cancel
Showing results for 
Search instead for 
Did you mean: 

Disable search option in Select Dialog

Former Member
0 Kudos

Hi,

Please let me know how to remove / disable search/filter option in select dialog .

below is my code to display the Select dialog .

var oSelectDialog = new sap.m.SelectDialog("selectdialog", {

  title: "Select Content",

  multiSelect: true,

//  showSearch : false

  });

oSelectDialog.open();

Thanks in advance

Regards,

Vamshi

View Entire Topic
raghava99
Explorer
0 Kudos

Hi ,

We Can hide/remove the search bar from SelectDialog using _searchField method.I am providing the snippet for your understanding.

 var oView = this.getView();
                if (!this._pDialog) {
                    this._pDialog = this.loadFragment({
                        name: "path",
                        controller: this
                    }).then(function (oDialog) {
                        oDialog._searchField.setVisible(false);
                        return oDialog;
                    });
                }

                this._pDialog.then(function (oDialog) {
                    oDialog._searchField.setVisible(false);
                    oDialog.open();
                }.bind(this));