fix(editor): lit change-in-update warning (#11904)

This PR fixed that lit change-in-update warning. Related #9446

### Before

![CleanShot 2025-04-23 at 02.18.16@2x.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/MyRfgiN4RuBxJfrza3SG/e1205c41-7890-4de8-ba14-99a88f66a9ac.png)

### After
![CleanShot 2025-04-23 at 02.18.42@2x.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/MyRfgiN4RuBxJfrza3SG/45bff6e5-a56f-43ac-abe9-6da9b75baca5.png)
This commit is contained in:
L-Sun
2025-04-22 20:25:54 +00:00
parent 45b6cbe8d7
commit 020c1a7598
4 changed files with 32 additions and 36 deletions

View File

@@ -259,14 +259,16 @@ export class ChatPanel extends SignalWatcher(
this.embeddingProgress = [0, 0];
};
protected override updated(_changedProperties: PropertyValues) {
protected override willUpdate(_changedProperties: PropertyValues) {
if (_changedProperties.has('doc')) {
this._resetPanel();
requestAnimationFrame(async () => {
await this._initPanel();
});
}
}
protected override updated(_changedProperties: PropertyValues) {
if (this.chatContextValue.status === 'loading') {
// reset the wheel triggered flag when the status is loading
this._wheelTriggered = false;

View File

@@ -156,7 +156,7 @@ export class AIChatComposer extends SignalWatcher(
);
}
protected override updated(_changedProperties: PropertyValues) {
protected override willUpdate(_changedProperties: PropertyValues) {
if (_changedProperties.has('doc')) {
this._resetComposer();
requestAnimationFrame(async () => {