new plugin FullUserInChatbox (#2766)

This commit is contained in:
sadan4 2024-12-30 00:07:26 -05:00 committed by GitHub
parent 0fd76ab15a
commit 20ed7dc96b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 59 additions and 2 deletions

View file

@ -27,7 +27,7 @@ interface Props<T = any> {
/** Render nothing if an error occurs */
noop?: boolean;
/** Fallback component to render if an error occurs */
fallback?: React.ComponentType<React.PropsWithChildren<{ error: any; message: string; stack: string; }>>;
fallback?: React.ComponentType<React.PropsWithChildren<{ error: any; message: string; stack: string; wrappedProps: T; }>>;
/** called when an error occurs. The props property is only available if using .wrap */
onError?(data: { error: Error, errorInfo: React.ErrorInfo, props: T; }): void;
/** Custom error message */
@ -81,6 +81,7 @@ const ErrorBoundary = LazyComponent(() => {
if (this.props.fallback)
return <this.props.fallback
wrappedProps={this.props.wrappedProps}
children={this.props.children}
{...this.state}
/>;