Skip to content

Commit c91801d

Browse files
author
Issayah
committed
fix: some v-fors in docs missing :key attr
fix(BContainer)!: remove toast props as they didn't work
1 parent 784c8c6 commit c91801d

File tree

5 files changed

+18
-30
lines changed

5 files changed

+18
-30
lines changed

apps/docs/docs/.vuepress/components/DocReference.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
</tr>
2626
</thead>
2727
<tbody>
28-
<tr v-for="prop in component.props">
28+
<tr v-for="(prop, index) in component.props" :key="index">
2929
<td class="text-nowrap">
3030
<code>{{ prop.prop }}</code>
3131
</td>
@@ -60,7 +60,7 @@
6060
</tr>
6161
</thead>
6262
<tbody>
63-
<tr v-for="event in component.events">
63+
<tr v-for="(event, index) in component.events" :key="index">
6464
<td class="text-nowrap">
6565
<code>{{ event.event }}</code>
6666
</td>
@@ -83,7 +83,7 @@
8383
</tr>
8484
</thead>
8585
<tbody>
86-
<tr v-for="slot in component.slots">
86+
<tr v-for="(slot, index) in component.slots" :key="index">
8787
<td class="text-nowrap">
8888
<code>{{ slot.name }}</code>
8989
</td>

apps/docs/docs/components/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ BootstrapVue 3 components
44

55
<ClientOnly>
66
<b-list-group>
7-
<b-list-group-item v-for="(component, key) in componentList">
7+
<b-list-group-item v-for="(component, key) in componentList" :key="key">
88
<RouterLink :to="`./${key}.html`">{{component.name}}</RouterLink>
99
<b-badge v-if="component.status=='todo'" variant="warning" pill>TODO</b-badge>
1010
<b-badge v-else-if="component.status=='wip'" variant="warning" pill>WIP</b-badge>

packages/bootstrap-vue-3/src/components/BContainer.vue

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@
1212

1313
<script setup lang="ts">
1414
import {computed, ref} from 'vue'
15-
import type {Position} from '../types'
15+
// import type {Position} from '../types'
1616
// import BToaster from './BToast/BToaster.vue'
1717
// import {ToastInstance} from './BToast/plugin'
1818
1919
interface Props {
2020
gutterX?: string
2121
gutterY?: string
2222
fluid?: boolean | 'sm' | 'md' | 'lg' | 'xl' | 'xxl' // boolean | Breakpoint
23-
toast?: Record<string, unknown> // Make this strongly typed
24-
position?: Position
23+
// toast?: Record<string, unknown> // Make this strongly typed
24+
// position?: Position
2525
tag?: string
2626
}
2727
@@ -32,16 +32,13 @@ const props = withDefaults(defineProps<Props>(), {
3232
3333
const container = ref()
3434
35-
const computedClasses = computed(() => [
36-
props.position,
37-
{
38-
container: props.fluid === false,
39-
[`container-fluid`]: props.fluid === true,
40-
[`container-${props.fluid}`]: typeof props.fluid === 'string',
41-
[`gx-${props.gutterX}`]: props.gutterX !== undefined,
42-
[`gy-${props.gutterY}`]: props.gutterY !== undefined,
43-
},
44-
])
35+
const computedClasses = computed(() => ({
36+
container: props.fluid === false,
37+
[`container-fluid`]: props.fluid === true,
38+
[`container-${props.fluid}`]: typeof props.fluid === 'string',
39+
[`gx-${props.gutterX}`]: props.gutterX !== undefined,
40+
[`gy-${props.gutterY}`]: props.gutterY !== undefined,
41+
}))
4542
4643
/* TODO finish this system
4744
const toasts = computed(() => toastInstance?.containerPositions.value)

packages/bootstrap-vue-3/src/components/BSkeleton/BSkeletonTable.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22
<b-table-simple v-bind="tableProps">
33
<thead v-if="!hideHeaderBoolean">
44
<tr>
5-
<th v-for="(th, i) in columns" :key="i">
5+
<th v-for="(_th, i) in columns" :key="i">
66
<b-skeleton />
77
</th>
88
</tr>
99
</thead>
1010
<tbody>
11-
<tr v-for="(tr, j) in rows" :key="j">
12-
<td v-for="(td, k) in columns" :key="k">
11+
<tr v-for="(_tr, j) in rows" :key="j">
12+
<td v-for="(_td, k) in columns" :key="k">
1313
<b-skeleton width="75%" />
1414
</td>
1515
</tr>
1616
</tbody>
1717
<tfoot v-if="showFooterBoolean">
1818
<tr>
19-
<th v-for="(th, l) in columns" :key="l">
19+
<th v-for="(_th, l) in columns" :key="l">
2020
<b-skeleton />
2121
</th>
2222
</tr>

packages/bootstrap-vue-3/src/components/container.spec.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,4 @@ describe('container', () => {
6868
await wrapper.setProps({gutterY: undefined})
6969
expect(wrapper.classes()).not.toContain('gy-xxl')
7070
})
71-
72-
it('has class from prop position', async () => {
73-
const wrapper = mount(BContainer, {
74-
props: {position: 'position-sticky'},
75-
})
76-
expect(wrapper.classes()).toContain('position-sticky')
77-
await wrapper.setProps({position: undefined})
78-
expect(wrapper.classes()).not.toContain('position-sticky')
79-
})
8071
})

0 commit comments

Comments
 (0)