Docs: add stack offset for featureSwitches and booleanSwitch

This commit is contained in:
Pieter Vander Vennet 2023-07-28 00:46:02 +02:00
parent 9d23f80539
commit 5269481afc
3 changed files with 21 additions and 24 deletions

View file

@ -10,7 +10,7 @@ import { Utils } from "../../Utils"
class FeatureSwitchUtils {
static initSwitch(key: string, deflt: boolean, documentation: string): UIEventSource<boolean> {
const defaultValue = deflt
const queryParam = QueryParameters.GetQueryParameter(key, "" + defaultValue, documentation)
const queryParam = QueryParameters.GetQueryParameter(key, "" + defaultValue, documentation, {stackOffset: -1})
// It takes the current layout, extracts the default value for this query parameter. A query parameter event source is then retrieved and flattened
return queryParam.sync(