-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Carousel: Index is undefined in PassThroughOptions #6264
Comments
The Having said that, as you have illustrated, you have access to the Assuming that you wanted to style similarly based on the start, end, or active item like in the base style, you can even use a :deep selector for the Here an updated example. |
Finding a solution for PT by looking at the inner API is not the right way. It may mislead you. In the new version, you can reach the index with context. |
Thank you for the help! I opted to go with another approach, but this might be useful for other components. |
|
Sorry I don't know which new version you mean, I am using v4 in my project and I am reading the documentation for v4. |
Describe the bug
I am trying to access the current
index
for each item inside the PassThroughOptions since I am using an unstyled component and needing to style the component by myself.Looking at the component style, you are using the
index
prop:https://github.com/primefaces/primevue/blob/master/packages/primevue/src/carousel/style/CarouselStyle.js
But when I am trying to access the
index
prop I just getundefined
:Please let me know if you need more information.
Reproducer
https://stackblitz.com/edit/2chshc?file=src%2FApp.vue
PrimeVue version
4.0.0
Vue version
3.x
Language
ES6
Build / Runtime
Vue CLI App
Browser(s)
Chrome
Steps to reproduce the behavior
index
Expected behavior
Accessing each index per item in the Carousel so I can style each separate item.
The text was updated successfully, but these errors were encountered: