OiO.lk Blog jQuery Maximizing a region using jQuery
jQuery

Maximizing a region using jQuery


I have an interactive grid region in oracle apex that I want to be able to maximize via a toggle button located on the far right side of the toolbar. The customization of the toggle button itself has been relatively straightforward but I am struggling with how to implement the maximize function. I included the code I have so far that is located in the interactive grid’s "Initialization JavaScript Function" section.

function(config) {
    let $           = apex.jQuery,
    toolbarData     = $.apex.interactiveGrid.copyDefaultToolbar(),
    toolbarGroup    = toolbarData.toolbarFind("actions4");

    toolbarGroup.controls.push(
        {
            type: "TOGGLE",
            action: "maximize-region",
            icon: "fa fa-expand"
        }
    );

    config.initActions = function(actions){
        actions.add({
            name: "maximize-region",
            maximize: false,  
            set: function(maximize) {
                this.maximize = maximize;
                //jQuery to maximize the region would go here
            }, get: function() {
                return this.maximize;
            }
        });
    }

    config.toolbarData = toolbarData;
    return config;

}

Any help would be greatly appreciated!



You need to sign in to view this answers

Exit mobile version