SearchControlsView
Description
The SearchControls view manages the controls for a search.
Documentation
Library path
splunkjs/mvc/searchcontrolsview
Properties
Name | Default value | Description |
id | | Required. The unique ID for this control. |
managerid | null | The ID of the search manager to bind this view to. |
Methods
Name | Description |
render | Draws the view to the screen. Called only when you create the view manually in JavaScript. |
Example (Django tag)
{% searchcontrols id="example-searchcontrols" managerid="example-search" %}
Example (JavaScript)
<script>
var deps = [
"splunkjs/ready!",
"splunkjs/mvc/searchcontrolsview"
];
require(deps, function(mvc) {
var SearchControlsView = require("splunkjs/mvc/searchcontrolsview");
// Instantiate components
new SearchControlsView({
id: "example-searchcontrols",
managerid: "example-search",
el: $("#mysearchcontrolsview")
}).render();
});
</script>
Code examples