Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

angular5 - Ag grid pagination arrow is not showing properly

I have recently updated my angular project from v5 to v11 and also updated ag grid.After up-gradation the pagination button is showing like box not as arrow sign. enter image description here

<ag-grid-angular #agGrid
                 style="width: 1125px;min-height: 895px;border-radius: 16px;"
                 id="myGrid" 
                 class="ag-theme-balham"
                 [rowData]="rowData" 
                 [enableSorting]="true"
                 [enableFilter]="true" 
                 [enableColResize]="true"
                 [paginationPageSize]="paginationPageSize"
                 [columnDefs]="columnDefs"
                 [autoGroupColumnDef]="autoGroupColumnDef"
                 [icons]="icons"
                 [rowSelection]="rowSelection" 
                 (gridReady)="onGridReady($event)"
                 [paginationAutoPageSize]="true"
                 [pagination]="true" 
                 [suppressRowClickSelection]="true" 
                 [groupSelectsChildren]="true"
                 [debug]="true" 
                 [enableRangeSelection]="true" 
                 [defaultColDef]="defaultColDef"
                 [components]="components"
                 [frameworkComponents]="frameworkComponents"
                 [context]="context"
                 [headerHeight]="headerHeight" 
                 [gridOptions]="gridOptions" 
                 [suppressContextMenu]="true" 
                 [suppressMenuMainPanel]="true"
                 [suppressMenuColumnPanel]="true"
                 (cellClicked)='onCellClicked($event)'
                 [floatingFilter]="false"
                 [enableColResize]="true" 
                 [rowHeight]='32' >
</ag-grid-angular>

My grid option:

this.gridOptions = {

  context: {
    componentParent: this
  },
  enableColResize: true,
  enableSorting: true,
  // enable filtering 
  enableFilter: true,
  headerHeight:30,
}

Package.json: "ag-grid": "^18.1.2", "ag-grid-angular": "^24.1.0", "ag-grid-community": "^24.1.0", "ag-grid-enterprise": "^24.1.0", "angular-font-awesome": "^3.1.2"

Please let me know where i m doing wrong, any help is appreciated


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I got the answer by just importing the css file in main style.css

@import "../node_modules/ag-grid-community/dist/styles/ag-theme-balham.css";

and it started working properly.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...