Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions resources/js/components/fieldtypes/CheckboxesFieldtype.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<Checkbox
v-for="(option, index) in options"
:disabled="config.disabled"
:id="`${id}_${index}`"
:key="index"
:label="option.label || option.value"
:read-only="isReadOnly"
Expand Down
3 changes: 2 additions & 1 deletion resources/js/components/ui/Checkbox/Item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const props = defineProps({
description: { type: String, default: null },
/** When `true`, disables the checkbox */
disabled: { type: Boolean, default: false },
id: { type: String, default: null },
/** When `true`, displays the checkbox in an indeterminate state (shows a dash) */
indeterminate: { type: Boolean, default: false },
/** Label text to display next to the checkbox */
Expand All @@ -37,7 +38,7 @@ const emit = defineEmits(['update:modelValue', 'keydown']);

const { appearance } = injectCheckboxContext() ?? { appearance: computed(() => 'default') };

const id = useId();
const id = useId(props.id);

const handleKeydown = (event) => {
emit('keydown', event);
Expand Down
Loading