-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃殌 Transferring useful composables from Anu UI lib to VueUse #2814
Comments
@Alfred-Skyblue Thanks for your attention. Yes,
BTW, this is just a proposal. We can completely ignore this and release what's already decided 馃槆 |
|
@antfu thanks for the review.
Will make a PR
Yes, it can be. I didn't knew about that passive option 馃ぉ
Agreed 馃憤
Basically it lets you create radio and checkbox like functionality where you can select value from defined options programmatically but without radio and checkbox. Have you checked the demo? |
Made a PR for If you ask me
ATM, |
First of all, I would like to apologize for not updating the Now, We are ready to close this issue if we get a decision on As you know, the Let's name it Here's what it already provides easily:
const { options, select, value: selected } = useOptions({ options: ['one', 'two', 'three'] })
console.log(options) // array of options object { isSelect: boolean, value: T }
console.log(selected) // currently selected value
select(options[0])
console.log(selected.value) // 'one'
Why not in Anu?
Please let me know your thoughts on this. 馃槆 Awaiting your response. |
Thank you for your proposals. I am still not very sure about it, it feels useful to build a UI library, but when building UI libraries, it might not be flexible to cover all cases. Since we are in slowing down, I feel it's better to have it live in Anu for now. Thank you. |
Thanks for your response 馃槆 |
Clear and concise description of the problem
Hi @antfu,
As we will be releasing v10 of VueUse which will have major features I want to contribute some composables from Anu.
Following "Slowing down new functions" warning I'm creating this issue to ask for approval for adding these composables.
Below is list of composables I'm willing to transfer to VueUse:
useParentElement
: Get parent element of componentuseInternalBooleanState
*: Inspired from Michael Thiessen's newsletter this creates internal state for prop. (*existing implementation in anu is for boolean prop and will be generic in VueUse)useSearch
&useSort
: Both composables can be great addition to VueUse as this will allow creating complex things like autocomplete & tables. Anu already uses it internally for table and in needed areas. However, I need some help from VueUse community to improve it further for general usage.useGroupModel
: My most favorite and super useful composable that let's you create v-model like binding for group. Here's demo on what it can offer. It is also used internally for components like select.I will be more than happy to see these composables in VueUse itself if you allow. Definitely I will need some help with TypeScript to improve it. I guess @okxiaoliang4 can help me with getting this composables to VueUse if you allow this.
Please let me know your thoughts on this, Thanks 鉂わ笍
Suggested solution
n/a
Alternative
n/a
Additional context
I'm also planning for a new release of Anu and now thinking of making a release with the update of VueUse v10. May I know what will be ETA of v10 to better organize Anu release?
Regards,
JD
Validations
The text was updated successfully, but these errors were encountered: