mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
fix(editor): lit change-in-update warning (#11904)
This PR fixed that lit change-in-update warning. Related #9446 ### Before  ### After 
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user