Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48983

Ion item(s) with checkbox & katex is slow

$
0
0

Hello!

Anyone has any idea why using “ion-item” in combination with “ion-checkbox” and “ng-katex-html” for rendering math formulas is slow when click on ion-checkbox (code below). The checkbox click action is slower when “ng-katex-html” contains html with katex math formulas and is even slower on mobile compared to web (difference reports like 1/3).

When no math formula inside “ng-katex-html”, ion-item’s behavior is just like in ionic demos. It is like additional classes added to elements inside ion-item are slowed down while being added by some thing.

Clicking many times (quickly) on ion-item, the item becomes gray and black due to slow rendering and recovers clicks stop.

Thus, difference is when formulas (already rendered) are clicked.

          <ion-item  *ngFor="let answer of answers; let i = index;">
            <ion-checkbox size="small" slot="start" [(ngModel)]="answer.isSelected"
              (click)="selectAnswer(answer)"></ion-checkbox>

            <div class="answer-content no-click" *ngIf="answer.text">
               <ng-katex-html [html]="answer.text | sanitizeHtml"></ng-katex-html> 
            </div>
          </ion-item>

Help would be appreciated!
Thank you!

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 48983

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>