-
Notifications
You must be signed in to change notification settings - Fork 39
Fixed stale state issue in ResourceEditor after saving #530
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -236,15 +236,16 @@ protected virtual Task OnShowResourceDetailsAsync(TResource resource) | |||
/// Opens the targeted <see cref="Resource"/>'s edition | ||||
/// </summary> | ||||
/// <param name="resource">The <see cref="Resource"/> to edit</param> | ||||
protected virtual Task OnShowResourceEditorAsync(TResource? resource = null) | ||||
protected virtual async Task OnShowResourceEditorAsync(TResource? resource = null) | ||||
{ | ||||
if (this.EditorOffCanvas == null) return Task.CompletedTask; | ||||
if (this.EditorOffCanvas == null) return; | ||||
var parameters = new Dictionary<string, object> | ||||
{ | ||||
{ nameof(ResourceEditor<TResource>.Resource), resource! } | ||||
}; | ||||
string actionType = resource == null ? "creation" : "edition"; | ||||
return this.EditorOffCanvas.ShowAsync<ResourceEditor<TResource>>(title: typeof(TResource).Name + " " + actionType, parameters: parameters); | ||||
await this.EditorOffCanvas.ShowAsync<ResourceEditor<TResource>>(title: typeof(TResource).Name + " " + actionType); | ||||
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. Duplicate ShowAsync call detected. Line 247 calls ShowAsync without parameters, then line 248 calls it again with parameters. The first call on line 247 should be removed as it serves no purpose and may cause unexpected behavior.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||
await this.EditorOffCanvas.ShowAsync<ResourceEditor<TResource>>(title: typeof(TResource).Name + " " + actionType, parameters: parameters); | ||||
} | ||||
|
||||
} | ||||
|
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -95,15 +95,16 @@ | |||
/// Opens the targeted <see cref="Resource"/>'s edition | ||||
/// </summary> | ||||
/// <param name="resource">The <see cref="Resource"/> to edit</param> | ||||
protected override Task OnShowResourceEditorAsync(Namespace? resource = null) | ||||
protected override async Task OnShowResourceEditorAsync(Namespace? resource = null) | ||||
{ | ||||
if (this.EditorOffCanvas == null) return Task.CompletedTask; | ||||
if (this.EditorOffCanvas == null) return; | ||||
var parameters = new Dictionary<string, object> | ||||
{ | ||||
{ nameof(ResourceEditor<Namespace>.Resource), resource! }, | ||||
{ nameof(ResourceEditor<Namespace>.IsCluster), true } | ||||
}; | ||||
string actionType = resource == null ? "creation" : "edition"; | ||||
return this.EditorOffCanvas.ShowAsync<ResourceEditor<Namespace>>(title: typeof(Namespace).Name + " " + actionType, parameters: parameters); | ||||
await this.EditorOffCanvas.ShowAsync<ResourceEditor<Namespace>>(title: typeof(Namespace).Name + " " + actionType); | ||||
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. Duplicate ShowAsync call detected. Line 107 calls ShowAsync without parameters, then line 108 calls it again with parameters. The first call on line 107 should be removed as it serves no purpose and may cause unexpected behavior.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||
await this.EditorOffCanvas.ShowAsync<ResourceEditor<Namespace>>(title: typeof(Namespace).Name + " " + actionType, parameters: parameters); | ||||
} | ||||
} |
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.
Extra space in lambda parameter 'cmp =>' should be 'cmp =>' for consistency with other lambda expressions in the code.
Copilot uses AI. Check for mistakes.