ssb: Tried to do the right lit things to prevent unnecessary re-rendering. Ended up doing a lazy JSON thing.

This commit is contained in:
2025-01-11 14:09:42 -05:00
parent 02759c6f83
commit aa15da50ab
5 changed files with 17 additions and 12 deletions

View File

@ -1,4 +1,4 @@
import {LitElement, html, unsafeHTML, until} from './lit-all.min.js';
import {LitElement, cache, html, unsafeHTML, until} from './lit-all.min.js';
import * as tfrpc from '/static/tfrpc.js';
import {styles} from './tf-styles.js';
@ -238,7 +238,7 @@ class TfTabNewsElement extends LitElement {
name.
</div>`;
}
return html`
return cache(html`
${this.render_sidebar()}
<div
style="margin-left: 2in; padding: 0px; top: 0; max-height: 100%; overflow: auto"
@ -297,7 +297,7 @@ class TfTabNewsElement extends LitElement {
></tf-tab-news-feed>
</div>
</div>
`;
`);
}
}