@@ -95,6 +95,7 @@ export class GridCoreComponent {
9595
9696 <div class="grid-comp-rows-loader"></div>
9797 <div class="grid-comp-no-rows">${ this . i18n ( 'no.rows' ) } </div>
98+ <div class="grid-comp-more-right-column-shadow"></div>
9899 <div class="grid-comp-col-resizing-line"></div>
99100 </div>
100101
@@ -253,6 +254,7 @@ export class GridCoreComponent {
253254 let classNames = 'grid-comp-col' ;
254255 let textContainerClassNames = 'grid-comp-col-text-container' ;
255256 let rightSection = '' ;
257+ let rightOutSection = '' ;
256258 let sortIcon = '' ;
257259 let resizable = colData . resizable ;
258260 let sortable = colData . sortable ;
@@ -279,7 +281,7 @@ export class GridCoreComponent {
279281
280282 if ( colData . sticky ) {
281283 classNames += ' grid-comp-col-sticky' ;
282- rightSection += '<span class="grid-comp-col-sticky-shadow"></span>' ;
284+ rightOutSection += '<span class="grid-comp-col-sticky-shadow"></span>' ;
283285 }
284286
285287 if ( resizable ) {
@@ -306,6 +308,7 @@ export class GridCoreComponent {
306308 </div>
307309 ${ rightSection }
308310 </div>
311+ ${ rightOutSection }
309312 </th>` ;
310313
311314 return html ;
@@ -347,7 +350,7 @@ export class GridCoreComponent {
347350 let value = key ? rowData [ colData . key ] : '' ;
348351 let classNames = 'grid-comp-col' ;
349352 let textTooltip = this . getTooltipAttrText ( value , true ) ;
350- let rightSection = '' ;
353+ let rightOutSection = '' ;
351354 let colStyle = { } ;
352355
353356 let colAttrData = {
@@ -374,7 +377,7 @@ export class GridCoreComponent {
374377
375378 if ( colData . sticky ) {
376379 classNames += ' grid-comp-col-sticky' ;
377- rightSection += '<span class="grid-comp-col-sticky-shadow"></span>' ;
380+ rightOutSection += '<span class="grid-comp-col-sticky-shadow"></span>' ;
378381 }
379382
380383 if ( colData . align ) {
@@ -384,8 +387,8 @@ export class GridCoreComponent {
384387 html = `<td class="${ classNames } " ${ DomUtils . getAttributesText ( colAttrData ) } >
385388 <div class="grid-comp-col-content" ${ DomUtils . getStyleText ( colStyle ) } >
386389 ${ html }
387- ${ rightSection }
388390 </div>
391+ ${ rightOutSection }
389392 </td>` ;
390393
391394 return html ;
@@ -977,6 +980,8 @@ export class GridCoreComponent {
977980 this . addEvent ( this . $pageNavPrev , 'click' , 'onPageNavPrevClick' ) ;
978981 this . addEvent ( this . $pageNavNext , 'click' , 'onPageNavNextClick' ) ;
979982
983+ this . addEvent ( this . $tableContainer , 'scroll' , 'onTableContainerScroll' ) ;
984+
980985 if ( this . showFilters ) {
981986 this . addEvent ( this . $filtersButton , 'click' , 'onFiltersButtonClick' ) ;
982987 this . addEvent ( this . $filtersBoxCancelButton , 'click' , 'onFiltersBoxCancelButtonClick' ) ;
@@ -1156,6 +1161,10 @@ export class GridCoreComponent {
11561161 onExportButtonClick ( e ) {
11571162 this . exportRows ( e . target ) ;
11581163 }
1164+
1165+ onTableContainerScroll ( ) {
1166+ this . setTableColumnShadow ( ) ;
1167+ }
11591168 /** dom event methods - end */
11601169
11611170 /** before event methods - start */
@@ -1185,6 +1194,7 @@ export class GridCoreComponent {
11851194 this . renderFooter ( ) ;
11861195 this . setVisibleColumns ( ) ;
11871196 this . setBodyHeight ( ) ;
1197+ this . setTableColumnShadow ( ) ;
11881198
11891199 if ( this . showFilters ) {
11901200 this . renderFiltersBox ( ) ;
@@ -1795,6 +1805,16 @@ export class GridCoreComponent {
17951805 reqData [ `${ d . key } [${ d . criteria } ]` ] = d . value ;
17961806 } ) ;
17971807 }
1808+
1809+ setTableColumnShadow ( ) {
1810+ let $tableContainer = this . $tableContainer ;
1811+ let scrollLeft = $tableContainer . scrollLeft ;
1812+ let hasLeftColumn = scrollLeft > 0 ;
1813+ let hasRightColumn = $tableContainer . scrollWidth > $tableContainer . clientWidth + scrollLeft ;
1814+
1815+ DomUtils . toggleClass ( this . $wrapper , 'has-left-column' , hasLeftColumn ) ;
1816+ DomUtils . toggleClass ( this . $wrapper , 'has-right-column' , hasRightColumn ) ;
1817+ }
17981818 /** set methods - end */
17991819
18001820 /** get methods - start */
0 commit comments