-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MWPW-161625: fix mas:pending event on requestUpdate #3388
base: stage
Are you sure you want to change the base?
Changes from 1 commit
43475cf
4f8b385
f261d64
69b9a58
bf753cb
ff5fc04
2d6d64b
44b4ccc
13cc5b1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
Large diffs are not rendered by default.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
Large diffs are not rendered by default.
3ch023 marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -148,6 +148,7 @@ export class MasElement { | |
if (options) this.options = options; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder if you can listen the very first There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. removed it, agree it's an unnessary event There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i would somewhere here though add some debug log to mention that element is pending resolution There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. added, thx |
||
this.state = STATE_PENDING; | ||
this.update(); | ||
this.log?.debug('Pending:', { element: this.wrapperElement }); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder if this has any performance impact, this it needs to kind of serialize the wrapperElement. |
||
return this.version; | ||
} | ||
|
||
|
@@ -195,10 +196,11 @@ export class MasElement { | |
this.state = state; | ||
this.error = error; | ||
this.value = value; | ||
// Update CSS and notify observers/listeners | ||
// Update CSS | ||
this.update(); | ||
this.notify(); | ||
} | ||
// notify observers/listeners | ||
this.notify(); | ||
} catch (error) { | ||
log.error(`Failed to render mas-element: `, error); | ||
this.toggleFailed(this.version, error, options); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File ignored because of a matching ignore pattern. Use "--no-ignore" to override.