mirror of
https://github.com/qlik-oss/nebula.js.git
synced 2025-12-19 17:58:43 -05:00
fix: handle outside navigation (#1747)
This commit is contained in:
@@ -353,6 +353,7 @@ const Cell = forwardRef(
|
|||||||
keyboardNavigation,
|
keyboardNavigation,
|
||||||
externalFocusManagement,
|
externalFocusManagement,
|
||||||
disableCellPadding = false,
|
disableCellPadding = false,
|
||||||
|
navigation: navigationApi,
|
||||||
} = useContext(InstanceContext);
|
} = useContext(InstanceContext);
|
||||||
const [internalEmitter] = useState(emitter || createEmitter);
|
const [internalEmitter] = useState(emitter || createEmitter);
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
@@ -461,7 +462,7 @@ const Cell = forwardRef(
|
|||||||
focusHandler: focusHandler.current,
|
focusHandler: focusHandler.current,
|
||||||
emitter: internalEmitter,
|
emitter: internalEmitter,
|
||||||
onMount,
|
onMount,
|
||||||
navigation,
|
navigation: navigation ?? navigationApi,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -157,6 +157,8 @@ const DEFAULT_CONTEXT = /** @lends Context */ {
|
|||||||
* @type {string=}
|
* @type {string=}
|
||||||
* */
|
* */
|
||||||
dataViewType: 'sn-table',
|
dataViewType: 'sn-table',
|
||||||
|
/** @type {Navigation=} */
|
||||||
|
navigation: {},
|
||||||
};
|
};
|
||||||
|
|
||||||
DEFAULT_CONFIG.context = DEFAULT_CONTEXT;
|
DEFAULT_CONFIG.context = DEFAULT_CONTEXT;
|
||||||
|
|||||||
@@ -792,6 +792,10 @@
|
|||||||
"optional": true,
|
"optional": true,
|
||||||
"defaultValue": "sn-table",
|
"defaultValue": "sn-table",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
},
|
||||||
|
"navigation": {
|
||||||
|
"optional": true,
|
||||||
|
"type": "#/definitions/Navigation"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1481,6 +1485,26 @@
|
|||||||
"const viz = await embed(app).render({\n element,\n type: 'barchart'\n});\nviz.destroy();"
|
"const viz = await embed(app).render({\n element,\n type: 'barchart'\n});\nviz.destroy();"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"Flags": {
|
||||||
|
"kind": "interface",
|
||||||
|
"entries": {
|
||||||
|
"isEnabled": {
|
||||||
|
"description": "Checks whether the specified flag is enabled.",
|
||||||
|
"kind": "function",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"name": "flag",
|
||||||
|
"description": "The value flag to check.",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"returns": {
|
||||||
|
"description": "True if the specified flag is enabled, false otherwise.",
|
||||||
|
"type": "boolean"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"AppSelections": {
|
"AppSelections": {
|
||||||
"kind": "class",
|
"kind": "class",
|
||||||
"constructor": {
|
"constructor": {
|
||||||
@@ -1718,26 +1742,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Flags": {
|
|
||||||
"kind": "interface",
|
|
||||||
"entries": {
|
|
||||||
"isEnabled": {
|
|
||||||
"description": "Checks whether the specified flag is enabled.",
|
|
||||||
"kind": "function",
|
|
||||||
"params": [
|
|
||||||
{
|
|
||||||
"name": "flag",
|
|
||||||
"description": "The value flag to check.",
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"returns": {
|
|
||||||
"description": "True if the specified flag is enabled, false otherwise.",
|
|
||||||
"type": "boolean"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"Field": {
|
"Field": {
|
||||||
"kind": "alias",
|
"kind": "alias",
|
||||||
"items": {
|
"items": {
|
||||||
|
|||||||
17
apis/stardust/types/index.d.ts
vendored
17
apis/stardust/types/index.d.ts
vendored
@@ -270,6 +270,7 @@ declare namespace stardust {
|
|||||||
keyboardNavigation?: boolean;
|
keyboardNavigation?: boolean;
|
||||||
disableCellPadding?: boolean;
|
disableCellPadding?: boolean;
|
||||||
dataViewType?: string;
|
dataViewType?: string;
|
||||||
|
navigation?: stardust.Navigation;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Galaxy {
|
interface Galaxy {
|
||||||
@@ -477,6 +478,14 @@ declare namespace stardust {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface Flags {
|
||||||
|
/**
|
||||||
|
* Checks whether the specified flag is enabled.
|
||||||
|
* @param flag The value flag to check.
|
||||||
|
*/
|
||||||
|
isEnabled(flag: string): boolean;
|
||||||
|
}
|
||||||
|
|
||||||
class AppSelections {
|
class AppSelections {
|
||||||
constructor();
|
constructor();
|
||||||
|
|
||||||
@@ -551,14 +560,6 @@ declare namespace stardust {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Flags {
|
|
||||||
/**
|
|
||||||
* Checks whether the specified flag is enabled.
|
|
||||||
* @param flag The value flag to check.
|
|
||||||
*/
|
|
||||||
isEnabled(flag: string): boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
type Field = string | qix.NxDimension | qix.NxMeasure | stardust.LibraryField;
|
type Field = string | qix.NxDimension | qix.NxMeasure | stardust.LibraryField;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user