File tree Expand file tree Collapse file tree 3 files changed +29
-1
lines changed
projects/igniteui-angular/src/lib/services Expand file tree Collapse file tree 3 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -202,6 +202,19 @@ describe('Excel Exporter', () => {
202202 wrapper . verifyDataFilesContent ( actualData . simpleGridData , 'No frozen columns should have been exported!' ) ;
203203 } ) ;
204204
205+ it ( 'should honor all pinned columns.' , async ( ) => {
206+ const result = await TestMethods . createGridAndPinColumn ( 2 , 0 ) ;
207+ const fix = result . fixture ;
208+ const grid = result . grid ;
209+
210+ options . ignorePinning = false ;
211+ fix . detectChanges ( ) ;
212+
213+ let wrapper = await getExportedData ( grid , options ) ;
214+ wrapper . verifyStructure ( ) ;
215+ await wrapper . verifyDataFilesContent ( actualData . gridJobTitleIdFrozen , 'Not all pinned columns are frozen in the export!' ) ;
216+ } ) ;
217+
205218 it ( 'should honor applied sorting.' , async ( ) => {
206219 const fix = TestBed . createComponent ( GridIDNameJobTitleComponent ) ;
207220 fix . detectChanges ( ) ;
Original file line number Diff line number Diff line change @@ -699,6 +699,21 @@ export class FileContentData {
699699 return this . createData ( ) ;
700700 }
701701
702+ get gridJobTitleIdFrozen ( ) {
703+ this . _sharedStringsData = `count="23" uniqueCount="21"><si><t>JobTitle</t></si><si><t>ID</t></si><si><t>Name</t></si><si><t>Vice President</t></si><si><t>Casey Houston</t></si><si><t>Director</t></si><si><t>Gilberto Todd</t></si><si><t>Tanya Bennett</t></si><si><t>Software Developer</t></si><si><t>Jack Simon</t></si><si><t>Senior Software Developer</t></si><si><t>Celia Martinez</t></si><si><t>CEO</t></si><si><t>Erma Walsh</t></si><si><t>Associate Software Developer</t></si><si><t>Debra Morton</t></si><si><t>Software Development Team Lead</t></si><si><t>Erika Wells</t></si><si><t>Leslie Hansen</t></si><si><t>Manager</t></si><si><t>Eduardo Ramirez</t></si>` ;
704+
705+ this . _tableData = `ref="A1:C11" totalsRowShown="0">
706+ <autoFilter ref="A1:C11"/><tableColumns count="3"><tableColumn id="1" name="JobTitle"/><tableColumn id="2" name="ID"/><tableColumn id="3" name="Name"/></tableColumns>` ;
707+
708+ this . _worksheetData = `<dimension ref="A1:C11"/>
709+ <sheetViews><sheetView tabSelected="1" workbookViewId="0"><pane xSplit="2" topLeftCell="C1" activePane="topRight" state="frozen"/></sheetView></sheetViews>
710+ <sheetFormatPr defaultRowHeight="15" x14ac:dyDescent="0.25"/>
711+ <cols><col min="1" max="1" width="50" customWidth="1"/><col min="2" max="2" width="50" customWidth="1"/><col min="3" max="3" width="50" customWidth="1"/></cols>
712+ <sheetData><row r="1"><c r="A1" t="s"><v>0</v></c><c r="B1" t="s"><v>1</v></c><c r="C1" t="s"><v>2</v></c></row><row r="2"><c r="A2" t="s"><v>3</v></c><c r="B2" s="1"><v>1</v></c><c r="C2" t="s"><v>4</v></c></row><row r="3"><c r="A3" t="s"><v>5</v></c><c r="B3" s="1"><v>2</v></c><c r="C3" t="s"><v>6</v></c></row><row r="4"><c r="A4" t="s"><v>5</v></c><c r="B4" s="1"><v>3</v></c><c r="C4" t="s"><v>7</v></c></row><row r="5"><c r="A5" t="s"><v>8</v></c><c r="B5" s="1"><v>4</v></c><c r="C5" t="s"><v>9</v></c></row><row r="6"><c r="A6" t="s"><v>10</v></c><c r="B6" s="1"><v>5</v></c><c r="C6" t="s"><v>11</v></c></row><row r="7"><c r="A7" t="s"><v>12</v></c><c r="B7" s="1"><v>6</v></c><c r="C7" t="s"><v>13</v></c></row><row r="8"><c r="A8" t="s"><v>14</v></c><c r="B8" s="1"><v>7</v></c><c r="C8" t="s"><v>15</v></c></row><row r="9"><c r="A9" t="s"><v>16</v></c><c r="B9" s="1"><v>8</v></c><c r="C9" t="s"><v>17</v></c></row><row r="10"><c r="A10" t="s"><v>14</v></c><c r="B10" s="1"><v>9</v></c><c r="C10" t="s"><v>18</v></c></row><row r="11"><c r="A11" t="s"><v>19</v></c><c r="B11" s="1"><v>10</v></c><c r="C11" t="s"><v>20</v></c></row></sheetData>` ;
713+
714+ return this . createData ( ) ;
715+ }
716+
702717 get treeGridData ( ) {
703718 this . _sharedStringsData =
704719 `count="21" uniqueCount="19"><si><t>ID</t></si><si><t>ParentID</t></si><si><t>Name</t></si><si><t>JobTitle</t></si><si><t>Age</t></si><si><t>Casey Houston</t></si><si><t>Vice President</t></si><si><t>Gilberto Todd</t></si><si><t>Director</t></si><si><t>Tanya Bennett</t></si><si><t>Debra Morton</t></si><si><t>Associate Software Developer</t></si><si><t>Jack Simon</t></si><si><t>Software Developer</t></si><si><t>Erma Walsh</t></si><si><t>CEO</t></si><si><t>Eduardo Ramirez</t></si><si><t>Manager</t></si><si><t>Leslie Hansen</t></si>` ;
Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ export abstract class IgxBaseExporter {
140140 }
141141
142142 if ( column . pinned && exportColumn ) {
143- this . _indexOfLastPinnedColumn = index ;
143+ this . _indexOfLastPinnedColumn ++ ;
144144 }
145145 } ) ;
146146
You can’t perform that action at this time.
0 commit comments