feat: function field form support sort#2754
Conversation
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
| }) | ||
| }, 100) | ||
| } | ||
|
|
There was a problem hiding this comment.
The provided code has some improvements and corrections that can be made:
-
Import Statement:
- Remove redundant
importstatement forPluscomponent as it's already imported before.
- Remove redundant
-
Template Ref Usage:
- The two reference variables (
initFieldTableRefandinputFieldTableRef) are used but not referenced anywhere else in the template. This can be cleaned up by either using them to call methods like.value.scrollTo({ top ... }), or remove unused references if they're no longer needed.
- The two reference variables (
-
Sortable.js Initialization:
- The initialization of
Sortableshould only happen when the table is rendered, which is done by adding a check inside theonLoad()lifecycle hook or an appropriate event listener to ensure all DOM elements are fully available.
import { onMounted } from 'vue' onMounted(() => { onDragHandle() })
- The initialization of
-
Unused Imports/Variables:
- There might be unused imports/variables such as
UserFieldFormDialogRefor properties that are set elsewhere in the component logic.
- There might be unused imports/variables such as
-
Performance Considerations:
- If sorting becomes expensive due to large data sets, consider optimizing rendering performance or implementing batch updates in cases where changes are frequent.
Overall, addressing these points will help improve maintainability, usability, and potentially performance of the dynamic table interactions within your Vue application.
What this PR does / why we need it?
Summary of your change
Please indicate you've done the following: