File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
projects/igniteui-angular-elements/src/app Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -525,9 +525,15 @@ class IgxCustomNgElementStrategy extends ComponentNgElementStrategy {
525525 //#endregion
526526
527527 protected initializeLocale ( componentRef : ComponentRef < any > ) {
528+ const componentTag = this . element . tagName . toLowerCase ( ) ;
529+ if ( componentTag !== 'igc-grid' && componentTag !== 'igc-tree-grid' &&
530+ componentTag !== 'igc-pivot-grid' && componentTag !== 'igc-hierarchical-grid' ) {
531+ // For now only main grid elements?
532+ return ;
533+ }
528534 const localeStringsInput = this . _componentFactory . inputs . find ( input => input . propName === "resourceStrings" ) ;
529535 if ( localeStringsInput ) {
530- const closestElement = componentRef . location . nativeElement . closest ( '[lang]' ) as HTMLElement ;
536+ const closestElement = this . element . closest ( '[lang]' ) as HTMLElement ;
531537 if ( closestElement ) {
532538 // Do not assign anything if no tag found. By default all grids have assigned EN resource strings.
533539 const lang = closestElement . lang . toUpperCase ( ) ;
You can’t perform that action at this time.
0 commit comments