Skip to content

Commit

Permalink
chore: improve naming & typing
Browse files Browse the repository at this point in the history
  • Loading branch information
yuwu9145 committed May 17, 2024
1 parent 83b1643 commit 9316bcd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions packages/vuetify/src/components/VList/VListGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { defineComponent, genericComponent, propsFactory, useRender } from '@/ut

export type VListGroupSlots = {
default: never
activator: { id: any, isOpen: boolean, props: Record<string, unknown> }
activator: { nestedId: unknown, isOpen: boolean, props: Record<string, unknown> }
}

const VListGroupActivator = defineComponent({
Expand Down Expand Up @@ -60,8 +60,8 @@ export const VListGroup = genericComponent<VListGroupSlots>()({
props: makeVListGroupProps(),

setup (props, { slots }) {
const { isOpen, open, id: _id } = useNestedItem(toRef(props, 'value'), true)
const id = computed(() => `v-list-group--id-${String(_id.value)}`)
const { isOpen, open, id: nestedId } = useNestedItem(toRef(props, 'value'), true)
const id = computed(() => `v-list-group--id-${String(nestedId.value)}`)
const list = useList()
const { isBooted } = useSsrBoot()

Expand Down Expand Up @@ -106,7 +106,7 @@ export const VListGroup = genericComponent<VListGroupSlots>()({
{ slots.activator && (
<VDefaultsProvider defaults={ activatorDefaults.value }>
<VListGroupActivator>
{ slots.activator({ id: _id.value, props: activatorProps.value, isOpen: isOpen.value }) }
{ slots.activator({ nestedId: nestedId.value, props: activatorProps.value, isOpen: isOpen.value }) }
</VListGroupActivator>
</VDefaultsProvider>
)}
Expand Down
4 changes: 2 additions & 2 deletions packages/vuetify/src/labs/VTreeview/VTreeviewChildren.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ export const VTreeviewChildren = genericComponent<new <T extends InternalListIte
{ ...treeviewGroupProps }
>
{{
activator: ({ props: activatorProps, id }) => (
activator: ({ props: activatorProps, nestedId }) => (
<VTreeviewItem
{ ...itemProps }
{ ...activatorProps }
loading={ loading }
v-slots={ slotsWithItem }
value={ id }
value={ nestedId }
onClick={ () => checkChildren(item) }
/>
),
Expand Down

0 comments on commit 9316bcd

Please sign in to comment.