From eb00b8ee23b839015c93742a8dc99a45eb6fecdf Mon Sep 17 00:00:00 2001 From: mertsincan Date: Tue, 5 Dec 2023 11:06:32 +0000 Subject: [PATCH] Fixed #4929 - Add parent param to all pt method options --- components/lib/accordion/Accordion.d.ts | 4 ++ components/lib/accordion/Accordion.vue | 1 + components/lib/accordiontab/AccordionTab.d.ts | 5 +- components/lib/autocomplete/AutoComplete.d.ts | 4 ++ components/lib/avatar/Avatar.d.ts | 5 +- components/lib/avatar/Avatar.vue | 15 ++-- components/lib/badge/Badge.vue | 14 +--- .../lib/badgedirective/BadgeDirective.d.ts | 4 ++ .../lib/basecomponent/BaseComponent.vue | 15 +++- components/lib/blockui/BlockUI.d.ts | 4 ++ components/lib/breadcrumb/Breadcrumb.d.ts | 4 ++ components/lib/button/Button.vue | 4 -- components/lib/calendar/Calendar.d.ts | 4 ++ components/lib/carousel/Carousel.d.ts | 4 ++ .../lib/cascadeselect/CascadeSelect.d.ts | 4 ++ components/lib/chart/Chart.d.ts | 4 ++ components/lib/checkbox/Checkbox.d.ts | 4 ++ components/lib/chip/Chip.d.ts | 4 ++ components/lib/chips/Chips.d.ts | 4 ++ components/lib/colorpicker/ColorPicker.d.ts | 4 ++ components/lib/column/Column.d.ts | 4 +- components/lib/columngroup/ColumnGroup.d.ts | 5 +- .../lib/confirmdialog/ConfirmDialog.d.ts | 4 ++ components/lib/confirmpopup/ConfirmPopup.d.ts | 4 ++ components/lib/contextmenu/ContextMenu.d.ts | 4 ++ components/lib/datatable/BodyCell.vue | 1 + components/lib/datatable/ColumnFilter.vue | 1 + components/lib/datatable/DataTable.d.ts | 4 ++ components/lib/datatable/FooterCell.vue | 1 + components/lib/datatable/HeaderCell.vue | 1 + components/lib/datatable/HeaderCheckbox.vue | 1 + components/lib/datatable/RowCheckbox.vue | 1 + components/lib/datatable/RowRadioButton.vue | 1 + components/lib/datatable/TableBody.vue | 1 + components/lib/datatable/TableFooter.vue | 2 + components/lib/datatable/TableHeader.vue | 3 + components/lib/dataview/DataView.d.ts | 4 ++ .../DataViewLayoutOptions.d.ts | 4 ++ .../lib/deferredcontent/DeferredContent.d.ts | 4 ++ components/lib/divider/Divider.d.ts | 4 ++ components/lib/dock/Dock.d.ts | 4 ++ components/lib/dropdown/Dropdown.vue | 69 +++++++------------ components/lib/editor/Editor.d.ts | 4 ++ components/lib/fieldset/Fieldset.d.ts | 4 ++ components/lib/fileupload/FileUpload.d.ts | 4 ++ components/lib/galleria/Galleria.d.ts | 4 ++ components/lib/image/Image.d.ts | 4 ++ .../lib/inlinemessage/InlineMessage.d.ts | 4 ++ components/lib/inplace/Inplace.d.ts | 4 ++ components/lib/inputgroup/InputGroup.d.ts | 4 ++ .../lib/inputgroupaddon/InputGroupAddon.d.ts | 4 ++ components/lib/inputmask/InputMask.d.ts | 4 ++ components/lib/inputnumber/InputNumber.vue | 12 +--- components/lib/inputswitch/InputSwitch.d.ts | 4 ++ components/lib/inputtext/InputText.vue | 12 ++-- components/lib/knob/Knob.d.ts | 4 ++ components/lib/listbox/Listbox.d.ts | 4 ++ components/lib/megamenu/MegaMenu.d.ts | 4 ++ components/lib/menu/Menu.d.ts | 4 ++ components/lib/menubar/Menubar.d.ts | 4 ++ components/lib/message/Message.vue | 24 +++---- components/lib/multiselect/MultiSelect.d.ts | 4 ++ components/lib/orderlist/OrderList.d.ts | 4 ++ .../organizationchart/OrganizationChart.d.ts | 4 ++ components/lib/overlaypanel/OverlayPanel.d.ts | 4 ++ components/lib/panel/Panel.d.ts | 4 ++ components/lib/panelmenu/PanelMenu.d.ts | 4 ++ components/lib/password/Password.d.ts | 4 ++ components/lib/picklist/PickList.d.ts | 4 ++ components/lib/progressbar/ProgressBar.vue | 20 ++---- .../lib/progressspinner/ProgressSpinner.d.ts | 4 ++ components/lib/radiobutton/RadioButton.d.ts | 4 ++ components/lib/rating/Rating.d.ts | 4 ++ components/lib/row/Row.d.ts | 5 +- components/lib/scrollpanel/ScrollPanel.d.ts | 4 ++ components/lib/scrolltop/ScrollTop.d.ts | 4 ++ components/lib/selectbutton/SelectButton.d.ts | 4 ++ components/lib/sidebar/Sidebar.d.ts | 4 ++ components/lib/skeleton/Skeleton.d.ts | 4 ++ components/lib/slider/Slider.d.ts | 4 ++ components/lib/speeddial/SpeedDial.d.ts | 4 ++ components/lib/splitbutton/SplitButton.d.ts | 4 ++ components/lib/splitter/Splitter.d.ts | 4 ++ .../lib/splitterpanel/SplitterPanel.d.ts | 4 ++ components/lib/steps/Steps.d.ts | 4 ++ components/lib/tabmenu/TabMenu.d.ts | 4 ++ components/lib/tabpanel/TabPanel.d.ts | 9 ++- components/lib/tabview/TabView.vue | 1 + components/lib/tag/Tag.d.ts | 4 ++ components/lib/terminal/Terminal.d.ts | 4 ++ components/lib/textarea/Textarea.d.ts | 4 ++ components/lib/timeline/Timeline.d.ts | 4 ++ components/lib/toast/Toast.d.ts | 4 ++ components/lib/togglebutton/ToggleButton.d.ts | 4 ++ components/lib/toolbar/Toolbar.d.ts | 4 ++ components/lib/tooltip/Tooltip.d.ts | 4 ++ components/lib/tree/Tree.vue | 26 +++---- components/lib/treeselect/TreeSelect.d.ts | 4 ++ components/lib/treetable/BodyCell.vue | 4 +- components/lib/treetable/FooterCell.vue | 1 + components/lib/treetable/HeaderCell.vue | 1 + components/lib/treetable/TreeTable.d.ts | 4 ++ .../tristatecheckbox/TriStateCheckbox.d.ts | 4 ++ .../lib/virtualscroller/VirtualScroller.d.ts | 4 ++ 104 files changed, 399 insertions(+), 158 deletions(-) diff --git a/components/lib/accordion/Accordion.d.ts b/components/lib/accordion/Accordion.d.ts index b3f3fece9..fdb67e367 100755 --- a/components/lib/accordion/Accordion.d.ts +++ b/components/lib/accordion/Accordion.d.ts @@ -31,6 +31,10 @@ export interface AccordionPassThroughMethodOptions { * Defines current inline state. */ state: AccordionState; + /** + * Defines parent options. + */ + parent: any; /** * Defines passthrough(pt) options in global config. */ diff --git a/components/lib/accordion/Accordion.vue b/components/lib/accordion/Accordion.vue index 601382f12..2814f52dd 100755 --- a/components/lib/accordion/Accordion.vue +++ b/components/lib/accordion/Accordion.vue @@ -106,6 +106,7 @@ export default { const tabMetaData = { props: tab.props || {}, parent: { + instance: this, props: this.$props, state: this.$data }, diff --git a/components/lib/accordiontab/AccordionTab.d.ts b/components/lib/accordiontab/AccordionTab.d.ts index e7c54415a..41ca49c03 100755 --- a/components/lib/accordiontab/AccordionTab.d.ts +++ b/components/lib/accordiontab/AccordionTab.d.ts @@ -8,7 +8,6 @@ * */ import { AnchorHTMLAttributes, HTMLAttributes, TransitionProps, VNode } from 'vue'; -import { AccordionPassThroughOptions } from '../accordion'; import { PassThroughOptions } from '../passthrough'; import { ClassComponent, GlobalComponentConstructor, PassThrough } from '../ts-helpers'; @@ -29,9 +28,9 @@ export interface AccordionTabPassThroughMethodOptions { */ props: AccordionTabProps; /** - * Defines parent instance. + * Defines parent options. */ - parent: AccordionPassThroughOptions; + parent: any; /** * Defines current options. */ diff --git a/components/lib/autocomplete/AutoComplete.d.ts b/components/lib/autocomplete/AutoComplete.d.ts index 5266f582d..0d0cb7183 100755 --- a/components/lib/autocomplete/AutoComplete.d.ts +++ b/components/lib/autocomplete/AutoComplete.d.ts @@ -38,6 +38,10 @@ export interface AutoCompletePassThroughMethodOptions { * Defines current options. */ context: AutoCompleteContext; + /** + * Defines parent options. + */ + parent: any; /** * Defines passthrough(pt) options in global config. */ diff --git a/components/lib/avatar/Avatar.d.ts b/components/lib/avatar/Avatar.d.ts index c2a23cb0f..94b3e9fe7 100644 --- a/components/lib/avatar/Avatar.d.ts +++ b/components/lib/avatar/Avatar.d.ts @@ -7,7 +7,6 @@ * @module avatar */ import { VNode } from 'vue'; -import { AvatarGroupPassThroughOptions } from '../avatargroup'; import { ComponentHooks } from '../basecomponent'; import { PassThroughOptions } from '../passthrough'; import { ClassComponent, GlobalComponentConstructor, PassThrough } from '../ts-helpers'; @@ -27,9 +26,9 @@ export interface AvatarPassThroughMethodOptions { */ props: AvatarProps; /** - * Defines parent instance. + * Defines parent options. */ - parent: AvatarGroupPassThroughOptions; + parent: any; /** * Defines passthrough(pt) options in global config. */ diff --git a/components/lib/avatar/Avatar.vue b/components/lib/avatar/Avatar.vue index 892e6fa58..4f772d63b 100644 --- a/components/lib/avatar/Avatar.vue +++ b/components/lib/avatar/Avatar.vue @@ -1,10 +1,10 @@ @@ -19,13 +19,6 @@ export default { methods: { onError(event) { this.$emit('error', event); - }, - getPTOptions(key) { - return this.ptm(key, { - parent: { - instance: this.$parent - } - }); } } }; diff --git a/components/lib/badge/Badge.vue b/components/lib/badge/Badge.vue index 4aab24f64..e6dbe943a 100644 --- a/components/lib/badge/Badge.vue +++ b/components/lib/badge/Badge.vue @@ -1,5 +1,5 @@ @@ -9,16 +9,6 @@ import BaseBadge from './BaseBadge.vue'; export default { name: 'Badge', - extends: BaseBadge, - methods: { - getPTOptions(key) { - return this.ptm(key, { - parent: { - props: this.$parent?.$props, - state: this.$parent?.$data - } - }); - } - } + extends: BaseBadge }; diff --git a/components/lib/badgedirective/BadgeDirective.d.ts b/components/lib/badgedirective/BadgeDirective.d.ts index 6fd22400c..37a04266e 100644 --- a/components/lib/badgedirective/BadgeDirective.d.ts +++ b/components/lib/badgedirective/BadgeDirective.d.ts @@ -18,6 +18,10 @@ export declare type BadgeDirectivePassThroughOptionType = BadgeDirectivePassThro */ export interface BadgePassThroughMethodOptions { context: BadgeContext; + /** + * Defines parent options. + */ + parent: any; /** * Defines passthrough(pt) options in global config. */ diff --git a/components/lib/basecomponent/BaseComponent.vue b/components/lib/basecomponent/BaseComponent.vue index 5b1d13831..e0df910e1 100644 --- a/components/lib/basecomponent/BaseComponent.vue +++ b/components/lib/basecomponent/BaseComponent.vue @@ -202,7 +202,20 @@ export default { return this.unstyled !== undefined ? this.unstyled : this.$config?.unstyled; }, $params() { - return { instance: this, props: this.$props, state: this.$data, parentInstance: this.$parentInstance }; + const parentInstance = this.$parentInstance || this.$parent; + + return { + instance: this, + props: this.$props, + state: this.$data, + parent: { + instance: parentInstance, + props: parentInstance?.$props, + state: parentInstance?.$data + }, + /* @deprecated since v3.43.0. Use the `parent.instance` instead of the `parentInstance`.*/ + parentInstance + }; }, $style() { return { classes: undefined, inlineStyles: undefined, loadStyle: () => {}, loadCustomStyle: () => {}, ...(this._getHostInstance(this) || {}).$style, ...this.$options.style }; diff --git a/components/lib/blockui/BlockUI.d.ts b/components/lib/blockui/BlockUI.d.ts index e8819a7fb..8df41b3f4 100755 --- a/components/lib/blockui/BlockUI.d.ts +++ b/components/lib/blockui/BlockUI.d.ts @@ -30,6 +30,10 @@ export interface BlockUIPassThroughMethodOptions { * Defines current inline state. */ state: BlockUIState; + /** + * Defines parent options. + */ + parent: any; /** * Defines passthrough(pt) options in global config. */ diff --git a/components/lib/breadcrumb/Breadcrumb.d.ts b/components/lib/breadcrumb/Breadcrumb.d.ts index add4421ad..1156bd2ea 100755 --- a/components/lib/breadcrumb/Breadcrumb.d.ts +++ b/components/lib/breadcrumb/Breadcrumb.d.ts @@ -31,6 +31,10 @@ export interface BreadcrumbPassThroughMethodOptions { * Defines current options. */ context: BreadcrumbContext; + /** + * Defines parent options. + */ + parent: any; /** * Defines passthrough(pt) options in global config. */ diff --git a/components/lib/button/Button.vue b/components/lib/button/Button.vue index b36c52f3e..59bed7278 100755 --- a/components/lib/button/Button.vue +++ b/components/lib/button/Button.vue @@ -26,10 +26,6 @@ export default { methods: { getPTOptions(key) { return this.ptm(key, { - parent: { - props: this.$parent?.$props, - state: this.$parent?.$data - }, context: { disabled: this.disabled } diff --git a/components/lib/calendar/Calendar.d.ts b/components/lib/calendar/Calendar.d.ts index b399e31d4..59d067f00 100755 --- a/components/lib/calendar/Calendar.d.ts +++ b/components/lib/calendar/Calendar.d.ts @@ -37,6 +37,10 @@ export interface CalendarPassThroughMethodOptions { * Defines current options. */ context: CalendarContext; + /** + * Defines parent options. + */ + parent: any; /** * Defines passthrough(pt) options in global config. */ diff --git a/components/lib/carousel/Carousel.d.ts b/components/lib/carousel/Carousel.d.ts index cbc767c69..92b95b798 100755 --- a/components/lib/carousel/Carousel.d.ts +++ b/components/lib/carousel/Carousel.d.ts @@ -34,6 +34,10 @@ export interface CarouselPassThroughMethodOptions { * Defines current options. */ context: CarouselContext; + /** + * Defines parent options. + */ + parent: any; /** * Defines passthrough(pt) options in global config. */ diff --git a/components/lib/cascadeselect/CascadeSelect.d.ts b/components/lib/cascadeselect/CascadeSelect.d.ts index 79a1d3230..d0da2ba0a 100644 --- a/components/lib/cascadeselect/CascadeSelect.d.ts +++ b/components/lib/cascadeselect/CascadeSelect.d.ts @@ -32,6 +32,10 @@ export interface CascadeSelectPassThroughMethodOptions { * Defines current inline state. */ state: CascadeSelectState; + /** + * Defines parent options. + */ + parent: any; /** * Defines passthrough(pt) options in global config. */ diff --git a/components/lib/chart/Chart.d.ts b/components/lib/chart/Chart.d.ts index 59454648a..2fde1c2e7 100755 --- a/components/lib/chart/Chart.d.ts +++ b/components/lib/chart/Chart.d.ts @@ -26,6 +26,10 @@ export interface ChartPassThroughMethodOptions { * Defines valid properties. */ props: ChartProps; + /** + * Defines parent options. + */ + parent: any; /** * Defines passthrough(pt) options in global config. */ diff --git a/components/lib/checkbox/Checkbox.d.ts b/components/lib/checkbox/Checkbox.d.ts index ee522b93c..80153ce83 100755 --- a/components/lib/checkbox/Checkbox.d.ts +++ b/components/lib/checkbox/Checkbox.d.ts @@ -34,6 +34,10 @@ export interface CheckboxPassThroughMethodOptions { * Defines current options. */ context: CheckboxContext; + /** + * Defines parent options. + */ + parent: any; /** * Defines passthrough(pt) options in global config. */ diff --git a/components/lib/chip/Chip.d.ts b/components/lib/chip/Chip.d.ts index c3529aa15..12836555b 100644 --- a/components/lib/chip/Chip.d.ts +++ b/components/lib/chip/Chip.d.ts @@ -30,6 +30,10 @@ export interface ChipPassThroughMethodOptions { * Defines current inline state. */ state: ChipState; + /** + * Defines parent options. + */ + parent: any; /** * Defines passthrough(pt) options in global config. */ diff --git a/components/lib/chips/Chips.d.ts b/components/lib/chips/Chips.d.ts index c70d56d77..28b3fbd54 100755 --- a/components/lib/chips/Chips.d.ts +++ b/components/lib/chips/Chips.d.ts @@ -30,6 +30,10 @@ export interface ChipsPassThroughMethodOptions { * Defines current inline state. */ state: ChipsState; + /** + * Defines parent options. + */ + parent: any; /** * Defines passthrough(pt) options in global config. */ diff --git a/components/lib/colorpicker/ColorPicker.d.ts b/components/lib/colorpicker/ColorPicker.d.ts index e9ad7f3ee..daf106952 100755 --- a/components/lib/colorpicker/ColorPicker.d.ts +++ b/components/lib/colorpicker/ColorPicker.d.ts @@ -32,6 +32,10 @@ export interface ColorPickerPassThroughMethodOptions { * Defines current inline state. */ state: ColorPickerState; + /** + * Defines parent options. + */ + parent: any; /** * Defines passthrough(pt) options in global config. */ diff --git a/components/lib/column/Column.d.ts b/components/lib/column/Column.d.ts index b9400f2f6..817307610 100755 --- a/components/lib/column/Column.d.ts +++ b/components/lib/column/Column.d.ts @@ -33,9 +33,9 @@ export interface ColumnPassThroughMethodOptions { */ props: ColumnProps; /** - * Defines parent instance. + * Defines parent options. */ - parent: DataTablePassThroughOptions; + parent: any; /** * Defines current options. */ diff --git a/components/lib/columngroup/ColumnGroup.d.ts b/components/lib/columngroup/ColumnGroup.d.ts index 40d836217..b1819839f 100755 --- a/components/lib/columngroup/ColumnGroup.d.ts +++ b/components/lib/columngroup/ColumnGroup.d.ts @@ -6,7 +6,6 @@ * @module columngroup */ import { ComponentHooks } from '../basecomponent'; -import { DataTablePassThroughOptions } from '../datatable'; import { PassThroughOptions } from '../passthrough'; import { ClassComponent, GlobalComponentConstructor, PassThrough } from '../ts-helpers'; @@ -25,9 +24,9 @@ export interface ColumnGroupPassThroughMethodOptions { */ props: ColumnGroupProps; /** - * Defines parent instance. + * Defines parent options. */ - parent: DataTablePassThroughOptions; + parent: any; /** * Defines current options. */ diff --git a/components/lib/confirmdialog/ConfirmDialog.d.ts b/components/lib/confirmdialog/ConfirmDialog.d.ts index 9597497e4..a0c6f7afc 100644 --- a/components/lib/confirmdialog/ConfirmDialog.d.ts +++ b/components/lib/confirmdialog/ConfirmDialog.d.ts @@ -32,6 +32,10 @@ export interface ConfirmDialogPassThroughMethodOptions { * Defines current inline state. */ state: ConfirmDialogState; + /** + * Defines parent options. + */ + parent: any; /** * Defines passthrough(pt) options in global config. */ diff --git a/components/lib/confirmpopup/ConfirmPopup.d.ts b/components/lib/confirmpopup/ConfirmPopup.d.ts index 4bf168c86..e2232ac0c 100644 --- a/components/lib/confirmpopup/ConfirmPopup.d.ts +++ b/components/lib/confirmpopup/ConfirmPopup.d.ts @@ -34,6 +34,10 @@ export interface ConfirmPopupPassThroughMethodOptions { * Defines current inline state. */ state: ConfirmPopupState; + /** + * Defines parent options. + */ + parent: any; /** * Defines passthrough(pt) options in global config. */ diff --git a/components/lib/contextmenu/ContextMenu.d.ts b/components/lib/contextmenu/ContextMenu.d.ts index 8ebc0b531..f1cc9f52a 100755 --- a/components/lib/contextmenu/ContextMenu.d.ts +++ b/components/lib/contextmenu/ContextMenu.d.ts @@ -38,6 +38,10 @@ export interface ContextMenuPassThroughMethodOptions { * Defines current options. */ context: ContextMenuContext; + /** + * Defines parent options. + */ + parent: any; /** * Defines passthrough(pt) options in global config. */ diff --git a/components/lib/datatable/BodyCell.vue b/components/lib/datatable/BodyCell.vue index ff3cf5499..89c99e78a 100755 --- a/components/lib/datatable/BodyCell.vue +++ b/components/lib/datatable/BodyCell.vue @@ -222,6 +222,7 @@ export default { const columnMetaData = { props: this.column.props, parent: { + instance: this, props: this.$props, state: this.$data }, diff --git a/components/lib/datatable/ColumnFilter.vue b/components/lib/datatable/ColumnFilter.vue index 9f94d6a64..fb3ca3883 100644 --- a/components/lib/datatable/ColumnFilter.vue +++ b/components/lib/datatable/ColumnFilter.vue @@ -330,6 +330,7 @@ export default { const columnMetaData = { props: this.column.props, parent: { + instance: this, props: this.$props, state: this.$data }, diff --git a/components/lib/datatable/DataTable.d.ts b/components/lib/datatable/DataTable.d.ts index ee7e08888..ba1eb3abd 100755 --- a/components/lib/datatable/DataTable.d.ts +++ b/components/lib/datatable/DataTable.d.ts @@ -41,6 +41,10 @@ export interface DataTablePassThroughMethodOptions { * Defines current options. */ context: DataTableContext; + /** + * Defines parent options. + */ + parent: any; /** * Defines passthrough(pt) options in global config. */ diff --git a/components/lib/datatable/FooterCell.vue b/components/lib/datatable/FooterCell.vue index 89efacdd9..3b60cd467 100644 --- a/components/lib/datatable/FooterCell.vue +++ b/components/lib/datatable/FooterCell.vue @@ -47,6 +47,7 @@ export default { const columnMetaData = { props: this.column.props, parent: { + instance: this, props: this.$props, state: this.$data }, diff --git a/components/lib/datatable/HeaderCell.vue b/components/lib/datatable/HeaderCell.vue index b47ab2e48..b1050b389 100644 --- a/components/lib/datatable/HeaderCell.vue +++ b/components/lib/datatable/HeaderCell.vue @@ -206,6 +206,7 @@ export default { const columnMetaData = { props: this.column.props, parent: { + instance: this, props: this.$props, state: this.$data }, diff --git a/components/lib/datatable/HeaderCheckbox.vue b/components/lib/datatable/HeaderCheckbox.vue index ee5322b74..f92202611 100755 --- a/components/lib/datatable/HeaderCheckbox.vue +++ b/components/lib/datatable/HeaderCheckbox.vue @@ -50,6 +50,7 @@ export default { const columnMetaData = { props: this.column.props, parent: { + instance: this, props: this.$props, state: this.$data }, diff --git a/components/lib/datatable/RowCheckbox.vue b/components/lib/datatable/RowCheckbox.vue index 45f92008c..d3faec8a0 100755 --- a/components/lib/datatable/RowCheckbox.vue +++ b/components/lib/datatable/RowCheckbox.vue @@ -55,6 +55,7 @@ export default { const columnMetaData = { props: this.column.props, parent: { + instance: this, props: this.$props, state: this.$data }, diff --git a/components/lib/datatable/RowRadioButton.vue b/components/lib/datatable/RowRadioButton.vue index 437cbefd9..409b5a42e 100755 --- a/components/lib/datatable/RowRadioButton.vue +++ b/components/lib/datatable/RowRadioButton.vue @@ -40,6 +40,7 @@ export default { const columnMetaData = { props: this.column.props, parent: { + instance: this, props: this.$props, state: this.$data }, diff --git a/components/lib/datatable/TableBody.vue b/components/lib/datatable/TableBody.vue index 764dc7daa..72383249b 100755 --- a/components/lib/datatable/TableBody.vue +++ b/components/lib/datatable/TableBody.vue @@ -310,6 +310,7 @@ export default { getColumnPT(key) { const columnMetaData = { parent: { + instance: this, props: this.$props, state: this.$data } diff --git a/components/lib/datatable/TableFooter.vue b/components/lib/datatable/TableFooter.vue index 016d2e719..e915644ec 100755 --- a/components/lib/datatable/TableFooter.vue +++ b/components/lib/datatable/TableFooter.vue @@ -43,6 +43,7 @@ export default { const columnGroupMetaData = { props: this.getColumnGroupProps(), parent: { + instance: this, props: this.$props, state: this.$data }, @@ -61,6 +62,7 @@ export default { const rowMetaData = { props: row.props, parent: { + instance: this, props: this.$props, state: this.$data }, diff --git a/components/lib/datatable/TableHeader.vue b/components/lib/datatable/TableHeader.vue index 11f049b5f..87c15cce2 100755 --- a/components/lib/datatable/TableHeader.vue +++ b/components/lib/datatable/TableHeader.vue @@ -234,6 +234,7 @@ export default { const columnGroupMetaData = { props: this.getColumnGroupProps(), parent: { + instance: this, props: this.$props, state: this.$data }, @@ -252,6 +253,7 @@ export default { const rowMetaData = { props: row.props, parent: { + instance: this, props: this.$props, state: this.$data }, @@ -269,6 +271,7 @@ export default { const columnMetaData = { props: column.props, parent: { + instance: this, props: this.$props, state: this.$data }, diff --git a/components/lib/dataview/DataView.d.ts b/components/lib/dataview/DataView.d.ts index d533a097e..9cb36756b 100755 --- a/components/lib/dataview/DataView.d.ts +++ b/components/lib/dataview/DataView.d.ts @@ -31,6 +31,10 @@ export interface DataViewPassThroughMethodOptions { * Defines current inline state. */ state: DataViewState; + /** + * Defines parent options. + */ + parent: any; /** * Defines passthrough(pt) options in global config. */ diff --git a/components/lib/dataviewlayoutoptions/DataViewLayoutOptions.d.ts b/components/lib/dataviewlayoutoptions/DataViewLayoutOptions.d.ts index 922d5bdc8..69079c819 100755 --- a/components/lib/dataviewlayoutoptions/DataViewLayoutOptions.d.ts +++ b/components/lib/dataviewlayoutoptions/DataViewLayoutOptions.d.ts @@ -35,6 +35,10 @@ export interface DataViewLayoutOptionsPassThroughMethodOptions { * Defines current inline state. */ state: DataViewLayoutOptionsState; + /** + * Defines parent options. + */ + parent: any; /** * Defines passthrough(pt) options in global config. */ diff --git a/components/lib/deferredcontent/DeferredContent.d.ts b/components/lib/deferredcontent/DeferredContent.d.ts index fe0ee670a..c2b10b093 100755 --- a/components/lib/deferredcontent/DeferredContent.d.ts +++ b/components/lib/deferredcontent/DeferredContent.d.ts @@ -30,6 +30,10 @@ export interface DeferredContentPassThroughMethodOptions { * Defines current inline state. */ state: DeferredContentState; + /** + * Defines parent options. + */ + parent: any; /** * Defines passthrough(pt) options in global config. */ diff --git a/components/lib/divider/Divider.d.ts b/components/lib/divider/Divider.d.ts index e3a9052cc..3d640f15b 100644 --- a/components/lib/divider/Divider.d.ts +++ b/components/lib/divider/Divider.d.ts @@ -26,6 +26,10 @@ export interface DividerPassThroughMethodOptions { * Defines valid properties. */ props: DividerProps; + /** + * Defines parent options. + */ + parent: any; /** * Defines passthrough(pt) options in global config. */ diff --git a/components/lib/dock/Dock.d.ts b/components/lib/dock/Dock.d.ts index b7304c1a5..3ad0e8c92 100644 --- a/components/lib/dock/Dock.d.ts +++ b/components/lib/dock/Dock.d.ts @@ -35,6 +35,10 @@ export interface DockPassThroughMethodOptions { * Defines current options. */ context: DockContext; + /** + * Defines parent options. + */ + parent: any; /** * Defines passthrough(pt) options in global config. */ diff --git a/components/lib/dropdown/Dropdown.vue b/components/lib/dropdown/Dropdown.vue index e5e76af99..0f6e6de60 100755 --- a/components/lib/dropdown/Dropdown.vue +++ b/components/lib/dropdown/Dropdown.vue @@ -1,5 +1,5 @@