Skip to content

Conversation

@AKAAE86
Copy link
Contributor

@AKAAE86 AKAAE86 commented Mar 21, 2025

Adding useSelectable hooks to support select feature.

  • SingleSelect
  • MultiSelect
  • Select All(only in multi select mode ), Revert All, Invert Selection(only in multi select mode)

@AKAAE86
Copy link
Contributor Author

AKAAE86 commented Mar 21, 2025

Kindly request you to review with that.Thank you. @junerver

@junerver
Copy link
Owner

junerver commented Mar 22, 2025

Thanks for your PR, it works great, I think we can adopt this feature into the project. Hope you can modify some code to make our code style look consistent.

  1. The same consistent file header declaration, like:
/*
  Description: 
  Author: Junerver
  Date: ${DATE}-${TIME}
  Email: junerver@gmail.com
  Version: v1.0
*/ 
  1. The return value of the hook function should be named XxxxHolder, and ensure its stability
  2. Do not return the state value directly, use State to wrap selectedItems
  3. Put State first in Holder, and the function is after the state
  4. Use useState instead of derivedStateOf, and use useCreate or useRef instead of remember
  5. Use deconstruction declaration syntax to replace the function call of Holder and declare a type alias for the function member
  6. Use gitmoji in git commit message, for example, use "✨: add new hook: useSelectable"

Thank you again for your contribution, this is a cool feature, I will merge this PR when you finish the modification

@AKAAE86 AKAAE86 force-pushed the master branch 2 times, most recently from b8efaa8 to 7eedd09 Compare March 23, 2025 01:39
@AKAAE86
Copy link
Contributor Author

AKAAE86 commented Mar 23, 2025

@junerver I have modified my commit, please take a look.Thank you!

@AKAAE86
Copy link
Contributor Author

AKAAE86 commented Mar 23, 2025

Honestly, I really love this project because I work with both React.js and Android.

@junerver junerver merged commit 63d2380 into junerver:master Mar 23, 2025
@junerver
Copy link
Owner

Thanks again for your contribution (^_^)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants