Skip to content

Commit

Permalink
fix: Fixed invalid ids (tooltip, radio, checkbox) (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
victoriakaropva authored Mar 20, 2024
1 parent cb844b8 commit ccb46fe
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/BuiCheckbox/BuiCheckbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const model = computed({
}
})
const id = nanoid(10)
const id = 'checkbox_' + nanoid(10)
const disabledAttrValue = computed(() => {
return Object.keys(props).includes('disabled') && props.disabled !== false ? true : undefined
Expand Down
2 changes: 1 addition & 1 deletion src/components/BuiRadio/BuiRadio.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const model = computed({
}
})
const id = nanoid(10)
const id = 'radio_' + nanoid(10)
const disabledAttrValue = computed(() => {
return Object.keys(props).includes('disabled') && props.disabled !== false ? true : undefined
Expand Down
2 changes: 1 addition & 1 deletion src/components/BuiTooltip/BuiTooltip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const props = withDefaults(
event: 'hover'
}
)
const componentId = nanoid()
const componentId = 'tooltip_' + nanoid()
onMounted(() => {
const selector = props.variant === 'id' && props.id ? `#${props.id}` : `#${componentId}`
Expand Down

0 comments on commit ccb46fe

Please sign in to comment.