Jan69
Jan69

Reputation: 1139

How to increase the size of PrimeNg loadingIcon

In the PrimeNg Turbotable I use loadingIcon to display the spinner while loading data. I am not able to increase the size of primeIcon pi-spinner.

HTML Code:

<p-table #resdt exportFilename="RecordChange"  [value]="recordList"  
      [(selection)]="selectedRecord" [loadingIcon]="loadingIcon" 
      [loading]="loading" sortField="recordCURD" sortMode="single" 
      [autoLayout]="true" scrollable="true" scrollHeight="550px">
....
</p-table>

TypeScript Code:

this.loadingIcon = 'pi pi-spin pi-spinner';

Upvotes: 3

Views: 5517

Answers (1)

Muhammed Albarmavi
Muhammed Albarmavi

Reputation: 24424

you just need to update the wrapper class for the loading element like this

style.css

.ui-table .ui-table-loading-icon {
    font-size: 5em !important;
}

or as we can set the icon class ,so this can be simply done by create a new class to increase the font size

.loading-icon-size { 
  font-size: 5em !important;
 }

template

<p-table .... [loading]="loading" loadingIcon="
    pi pi-spin pi-spinner loading-icon-size ">
 .....
</table> 

demo 🚀🚀

Upvotes: 5

Related Questions