SearchControlsView

The SearchControls view

Description

The SearchControls view manages the controls for a search.

Documentation

Library path

Properties

Name

Default value

Description

id Required. The unique ID for this control.
manageridnullThe ID of the search manager to bind this view to.

Methods

Name

Description

renderDraws 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