Comments (10)
Hi @soulsam480
Why do you need default slot?
You might be looking for item slot to render the custom content inside the list item, right?
from anu.
Hi @soulsam480
item prop be super flexible
prop or slot?
if your gihub sponsors is open, would love to contribute some
Thanks for the honor. I will open sponsorship later but first I want to provide some value via this framework.
Regarding the last reply, I pushed new commit that:
- Allows
item
slot so that you can customize the list item rendering.item
slot providesitem
&index
as slot props.
Source code
I hope this will resolve this issue. Have you checked the anu with latest update (I haven't released the change yet but you can try master branch)
Awaiting your response.
from anu.
prop or slot?
Ah sorry, I meant a slot.
I hope this will resolve this issue. Have you checked the anu with latest update (I haven't released the change yet but you can try master branch)
Awaiting your response.
Just checked, super work. I think this solves my thing. thx for your work again.
from anu.
I suspect the error is coming from here
. Please tell me how can I help.from anu.
Maybe we have to do:
- props.items[0].value ? props.items.map(i => i.value) : props.items.length
+ props.items && props.items[0].value ? props.items.map(i => i.value) : props.items.length
However, we might have to take care of other things like click:
from anu.
Maybe I should learn how to write tests now
from anu.
@soulsam480 I'm on it
from anu.
Closed via 467f8df
from anu.
Hi @soulsam480
Why do you need default slot?
You might be looking for item slot to render the custom content inside the list item, right?
@jd-solanki Yessir correct. Also the current API design is great, but in terms of flexibility, I think we can do better. e.g. in a list along with prepend
and append
slots, an item prop be super flexible. I think you already know this, but taking some inspiration from the API design of Quasar
will be a great idea as it's the holy grail of vue component lib IMO. anyways awesome work, if your gihub sponsors is open, would love to contribute some.
from anu.
Maybe we have to do:
- props.items[0].value ? props.items.map(i => i.value) : props.items.length + props.items && props.items[0].value ? props.items.map(i => i.value) : props.items.lengthHowever, we might have to take care of other things like click:
I think this will still fail, if the items array is empty, i.e. first item is undefined and the error will be can't read property value of undefined. fix can be making it an optional chain e.g.
props.items && props.items[0]?.value ? props.items.map(i => i.value) : props.items.length
from anu.
Related Issues (20)
- feat: chip closable advance HOT 2
- Styles are not loaded in the latest Nuxt HOT 7
- [docs] Components such as Select and Radio in the document cannot interact HOT 1
- svelte support HOT 1
- nuxt - anu-vue/volar HOT 3
- update vueuse peerDependencies
- WARN [unocss] include option is deprecated, use content.pipeline.include instead. HOT 2
- Tabs border does not respond to window size change HOT 1
- [unocss] include option is deprecated, use content.pipeline.include instead. But, I didn't use include.
- Colors broken with UnoCSS v0.57 HOT 7
- Have a Bug in the switch component? HOT 3
- typescript types error๏ผ HOT 2
- ๐คน๐ปโโ๏ธ Framework stability in Vue Ecosystem & my vision HOT 6
- update vue peerDependencies HOT 1
- How the selection box sets the properties of the display HOT 1
- [Select] Feature request: Groups for the select element
- v1
- List component unusable with TypeScript HOT 4
- ADatatable : event on clicked / hovered
- Style conflict vitepress HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anu.