Skip to content

Is there a way to suppress _hsc for just one view? #462

Answered by cortexrd
LeighBerrell asked this question in Q&A
Discussion options

You must be logged in to vote

Hi Leigh,

Yes, that's easy to do with a few lines of code:

If you don't already have the call to setup the views (ktl.views.setCfg), you'll need to add it, like this:

ktl.views.setCfg({
    //Any other settings you need may be included here...
    hscCollapsedColumnsWidth: '5',
    hscGlobal: true,
    hscAllowed: hscAllowed,
})

function hscAllowed(viewId) {
    if (['view_112', 'view_234'].includes(viewId))
        return false;
    return true;
}

The magic sauce is the hscAllowed function, where the logic is applied.

You can put whatever you like in there. In one use case I have, I also disable this feature across the board if the device is running in kiosk mode.

Enjoy,
Norm

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@LeighBerrell
Comment options

@topdog-BigDogWerks
Comment options

Answer selected by LeighBerrell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants