@@ -86,6 +86,7 @@ export type SendbirdUIKitContainerProps = React.PropsWithChildren<{
8686 HeaderComponent ?: HeaderStyleContextType [ 'HeaderComponent' ] ;
8787 } ;
8888 errorBoundary ?: {
89+ disabled ?: boolean ;
8990 onError ?: ( props : ErrorBoundaryProps ) => void ;
9091 ErrorInfoComponent ?: ( props : ErrorBoundaryProps ) => JSX . Element ;
9192 } ;
@@ -142,17 +143,20 @@ const SendbirdUIKitContainer = ({
142143 trigger : MentionConfig . DEFAULT . TRIGGER ,
143144 } ) ;
144145 return new MentionManager ( config , chatOptions ?. enableUserMention ?? SendbirdUIKit . DEFAULT . USER_MENTION ) ;
145- } , [ userMention ?. mentionLimit , userMention ?. suggestionLimit , userMention ?. debounceMills ] ) ;
146+ } , [
147+ chatOptions ?. enableUserMention ,
148+ userMention ?. mentionLimit ,
149+ userMention ?. suggestionLimit ,
150+ userMention ?. debounceMills ,
151+ ] ) ;
146152
147- const imageCompressionConfig = useMemo (
148- ( ) =>
149- new ImageCompressionConfig ( {
150- compressionRate : imageCompression ?. compressionRate || ImageCompressionConfig . DEFAULT . COMPRESSION_RATE ,
151- width : imageCompression ?. width ,
152- height : imageCompression ?. height ,
153- } ) ,
154- [ imageCompression ?. compressionRate , imageCompression ?. width , imageCompression ?. height ] ,
155- ) ;
153+ const imageCompressionConfig = useMemo ( ( ) => {
154+ return new ImageCompressionConfig ( {
155+ compressionRate : imageCompression ?. compressionRate || ImageCompressionConfig . DEFAULT . COMPRESSION_RATE ,
156+ width : imageCompression ?. width ,
157+ height : imageCompression ?. height ,
158+ } ) ;
159+ } , [ imageCompression ?. compressionRate , imageCompression ?. width , imageCompression ?. height ] ) ;
156160
157161 useLayoutEffect ( ( ) => {
158162 if ( ! isFirstMount ) {
@@ -172,6 +176,14 @@ const SendbirdUIKitContainer = ({
172176 } ;
173177 } , [ appId , internalStorage ] ) ;
174178
179+ const renderChildren = ( ) => {
180+ if ( errorBoundary ?. disabled ) {
181+ return children ;
182+ } else {
183+ return < InternalErrorBoundaryContainer { ...errorBoundary } > { children } </ InternalErrorBoundaryContainer > ;
184+ }
185+ } ;
186+
175187 return (
176188 < SafeAreaProvider >
177189 < SendbirdChatProvider
@@ -229,9 +241,7 @@ const SendbirdUIKitContainer = ({
229241 } ,
230242 } }
231243 >
232- < InternalErrorBoundaryContainer { ...errorBoundary } >
233- { children }
234- </ InternalErrorBoundaryContainer >
244+ { renderChildren ( ) }
235245 </ DialogProvider >
236246 ) ;
237247 } }
0 commit comments