mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Fixed #4929 - Add parent param to all pt method options
This commit is contained in:
parent
1a4bba8107
commit
eb00b8ee23
104 changed files with 399 additions and 158 deletions
|
@ -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 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue