Skip to content

feat: function field form support sort#2754

Merged
wangdan-fit2cloud merged 1 commit intomainfrom
pr@main/perf-function-sort
Mar 31, 2025
Merged

feat: function field form support sort#2754
wangdan-fit2cloud merged 1 commit intomainfrom
pr@main/perf-function-sort

Conversation

@wangdan-fit2cloud
Copy link
Copy Markdown
Contributor

What this PR does / why we need it?

Summary of your change

Please indicate you've done the following:

  • Made sure tests are passing and test coverage is added if needed.
  • Made sure commit message follow the rule of Conventional Commits specification.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed.

@f2c-ci-robot
Copy link
Copy Markdown

f2c-ci-robot bot commented Mar 31, 2025

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.

Details

Instructions 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.

@f2c-ci-robot
Copy link
Copy Markdown

f2c-ci-robot bot commented Mar 31, 2025

[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.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@wangdan-fit2cloud wangdan-fit2cloud merged commit 596b137 into main Mar 31, 2025
4 of 5 checks passed
@wangdan-fit2cloud wangdan-fit2cloud deleted the pr@main/perf-function-sort branch March 31, 2025 11:34
})
}, 100)
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The provided code has some improvements and corrections that can be made:

  1. Import Statement:

    • Remove redundant import statement for Plus component as it's already imported before.
  2. Template Ref Usage:

    • The two reference variables (initFieldTableRef and inputFieldTableRef) 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.
  3. Sortable.js Initialization:

    • The initialization of Sortable should only happen when the table is rendered, which is done by adding a check inside the onLoad() lifecycle hook or an appropriate event listener to ensure all DOM elements are fully available.
    import { onMounted } from 'vue'
    
    onMounted(() => {
      onDragHandle()
    })
  4. Unused Imports/Variables:

    • There might be unused imports/variables such as UserFieldFormDialogRef or properties that are set elsewhere in the component logic.
  5. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants