diff --git a/components/lib/splitterpanel/SplitterPanel.d.ts b/components/lib/splitterpanel/SplitterPanel.d.ts index bd3476113..0bdc308aa 100644 --- a/components/lib/splitterpanel/SplitterPanel.d.ts +++ b/components/lib/splitterpanel/SplitterPanel.d.ts @@ -19,6 +19,7 @@ export declare type SplitterPanelPassThroughOptionType = SplitterPanelPassThroug export interface SplitterPanelPassThroughMethodOptions { instance: any; props: SplitterPanelProps; + context: SplitterPanelContext; } /** @@ -44,6 +45,16 @@ export interface SplitterPanelPassThroughAttributes { [key: string]: any; } +/** + * Defines options in SplitterPanel component. + */ +export interface SplitterPanelContext { + /** + * Current nested state of the panel. + */ + nested?: boolean; +} + /** * Defines valid properties in SplitterPanel component. */ diff --git a/components/lib/splitterpanel/SplitterPanel.vue b/components/lib/splitterpanel/SplitterPanel.vue index cd8be8700..38af1a16a 100644 --- a/components/lib/splitterpanel/SplitterPanel.vue +++ b/components/lib/splitterpanel/SplitterPanel.vue @@ -15,6 +15,13 @@ export default { return this.$slots.default().some((child) => { return child.type.name === 'Splitter'; }); + }, + getPTOptions() { + return { + context: { + nested: this.isNested + } + }; } } };