Checkboxes not working
Description
I am new to Twill CMS, I am not sure i did not configure things properly or what.
My Checkboxes is not clickable, whenever i click it, it shows an error in the console.
I am not sure does it related to Migration files or Model or what, because i haven't setup any columns/fields on that yet, but a JS error looks like frontend-only issue to me
Steps to reproduce
- Add the checkboxes field
<x-twill::checkboxes name="external_links" label="External Links" :options="[
['value' => 'website', 'label' => 'Website'],
['value' => 'facebook', 'label' => 'Facebook'],
['value' => 'instagram', 'label' => 'Instagram'],
['value' => 'other', 'label' => 'Other'],
]" />
I have also tried this in the controller, same issue
Checkboxes::make()
->default([])
->name('external_links')
->label('External Links')
->options([
['value' => 'website', 'label' => 'Website'],
['value' => 'facebook', 'label' => 'Facebook'],
['value' => 'instagram', 'label' => 'Instagram'],
['value' => 'other', 'label' => 'Other'],
]),
- Click on the checkbox, boom, nothing happens but an error in console
Versions
Twill version: 3.5.2 Laravel version: 11.44.2 PHP version: 8.2 Database engine: MySQL
This shouldn't possibly happen
https://github.com/area17/twill/blob/5ad223769424986ae4ff7db727fcba3bdfe5296c/frontend/js/components/MultiSelect.vue#L91-L96
You don't happen to have a script that modifies Array.prototype.slice ?
Edit: forgot that String also has the slice method, which is why that didn't trigger an error