Commit 0cba88a 1 parent 4ea36e8 commit 0cba88a Copy full SHA for 0cba88a
File tree 1 file changed +9
-1
lines changed
packages/sitecore-jss-react/src/components
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,11 @@ import {
12
12
import { convertAttributesToReactProps } from '../utils' ;
13
13
import { HiddenRendering , HIDDEN_RENDERING_NAME } from './HiddenRendering' ;
14
14
15
+ const EXCLUDE_PLACEHOLDERS_RENDER = [
16
+ new RegExp ( / c o l u m n - ( \d { 1 } ) - \{ \* \} / i) ,
17
+ new RegExp ( / r o w - ( \d { 1 } ) - \{ \* \} / i) ,
18
+ ] ;
19
+
15
20
type ErrorComponentProps = {
16
21
[ prop : string ] : unknown ;
17
22
} ;
@@ -121,7 +126,10 @@ export class PlaceholderCommon<T extends PlaceholderProps> extends React.Compone
121
126
from backend side we get common name of placeholder is called 'nameOfContainer-{*}' where '{*}' marker for replacing **/
122
127
if ( rendering ?. placeholders ) {
123
128
Object . keys ( rendering . placeholders ) . forEach ( ( placeholder ) => {
124
- if ( placeholder . indexOf ( '{*}' ) !== - 1 ) {
129
+ if (
130
+ placeholder . indexOf ( '{*}' ) !== - 1 &&
131
+ EXCLUDE_PLACEHOLDERS_RENDER . some ( ( pattern ) => name . search ( pattern ) === - 1 )
132
+ ) {
125
133
rendering . placeholders [ name ] = rendering . placeholders [ placeholder ] ;
126
134
delete rendering . placeholders [ placeholder ] ;
127
135
}
You can’t perform that action at this time.
0 commit comments