Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #6908: Missing props in MessagesPassThroughMethodOptions and MessagesProps #6909

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions components/doc/common/apidoc/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -35548,6 +35548,14 @@
"type": "CSSTransitionProps",
"default": "",
"description": "The properties of CSSTransition can be customized, except for \"nodeRef\" and \"in\" properties."
},
{
"name": "unstyled",
"optional": true,
"readonly": false,
"type": "boolean",
"default": "false",
"description": "When enabled, it removes component related styles in the core."
}
]
},
Expand Down Expand Up @@ -35596,6 +35604,24 @@
"optional": false,
"readonly": false,
"type": "MessagesProps"
},
{
"name": "state",
"optional": false,
"readonly": false,
"type": "MessagesState"
},
{
"name": "hostName",
"optional": true,
"readonly": false,
"type": "string"
},
{
"name": "index",
"optional": true,
"readonly": false,
"type": "number"
}
],
"callbacks": []
Expand Down Expand Up @@ -35670,6 +35696,20 @@
],
"callbacks": []
},
"MessagesState": {
"description": "Defines current inline state in Messages component.",
"relatedProp": "",
"props": [
{
"name": "messages",
"optional": false,
"readonly": false,
"type": "Object[]",
"description": "Array of messages"
}
],
"callbacks": []
},
"MessagesMessage": {
"relatedProp": "",
"props": [
Expand Down
21 changes: 21 additions & 0 deletions components/lib/messages/messages.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ export declare type MessagesPassThroughTransitionType = ReactCSSTransitionProps
*/
export interface MessagesPassThroughMethodOptions {
props: MessagesProps;
state: MessagesState;
hostName?: string;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will have to look. What is hostname? Weird property for messages.

Copy link
Contributor Author

@ivanpajon ivanpajon Jul 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since last release I see that prop in some components... I don't know what it is neither. If you see my PR #6902 in the stackblitz reproducer, you will see that prop also for bodyRow in Datatable component.
I only include that prop here because it is passed through MessagesPassThroughMethodOptions.

index?: number;
}

/**
Expand Down Expand Up @@ -68,6 +71,19 @@ export interface MessagesPassThroughOptions {
transition?: MessagesPassThroughTransitionType;
}

/**
* Defines current inline state in Messages component.
*/
export interface MessagesState {
/**
* Array of messages
*/
messages: Array<{
_pId: number;
message: MessagesMessage;
}>;
}

export interface MessagesMessage {
/**
* Unique id of the message.
Expand Down Expand Up @@ -163,6 +179,11 @@ export interface MessagesProps extends Omit<React.DetailedHTMLProps<React.HTMLAt
* @type {PassThroughOptions}
*/
ptOptions?: PassThroughOptions;
/**
* When enabled, it removes component related styles in the core.
* @defaultValue false
*/
unstyled?: boolean;
}

/**
Expand Down
Loading