Copilot commented on code in PR #508:
URL:
https://github.com/apache/skywalking-booster-ui/pull/508#discussion_r2446556515
##########
src/views/dashboard/related/trace/components/TraceQuery/TracesTable.vue:
##########
@@ -61,7 +55,7 @@ limitations under the License. -->
</template>
</el-table-column>
<el-table-column label="Root" prop="label" />
- <el-table-column label="Start Time" prop="timestamp" width="220">
+ <el-table-column label="Start Time" prop="start" width="220" sortable
:sort-method="sortByStartTime">
Review Comment:
The prop changed from 'timestamp' to 'start', but the sort-method binding
uses a function that doesn't need to be bound here. When using client-side
sorting with Element Plus tables, the sort-method should only be provided for
custom sorting logic that the table will call automatically. However, the
actual sorting is now handled in the filteredTraces computed property (lines
165-177), making this :sort-method binding redundant and potentially causing
the sorting to be applied twice.
```suggestion
<el-table-column label="Start Time" prop="start" width="220" sortable>
```
##########
src/views/dashboard/related/trace/components/TraceQuery/TracesTable.vue:
##########
@@ -16,14 +16,7 @@ limitations under the License. -->
<div class="flex-h result-header">
<div style="align-items: center"> {{ filteredTraces.length }} of {{
totalTraces }} Results </div>
<div class="flex-h" style="align-items: center">
- <el-switch
- v-model="expandAll"
- size="large"
- active-text="Expand All"
- inactive-text="Collapse All"
- class="mr-20"
- @change="toggleAllExpansion"
- />
+ <el-switch v-model="expandAll" size="large" active-text="Expand All"
inactive-text="Collapse All" class="mr-20" />
Review Comment:
The `@change` handler was removed from the el-switch component. While the
functionality is now handled by a watcher, this change removes the explicit
connection between user interaction and the handler. If the watcher approach is
intentional, this is fine, but verify that all expand/collapse scenarios still
work correctly with just the watcher.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]