Closed joeyramone76 closed 9 months ago
Hey @joeyramone76 ,
I tried to reproduce this but without success.
Can you make sure that/run php artisan twill:update
and then clear the browser cache just to be sure.
Hi @haringsrob , thanks for the reply. I had already tried and did it again now but with no luck.
if you find it useful I am attaching part of the code
@extends('twill::layouts.form')
@section('contentFields')
@formField('multi_select', [
'name' => 'foodCategories',
'label' => 'Categorie',
'options' => $foodCategories,
'min' => 1,
'max' => 5
])
@formField('wysiwyg', [
'name' => 'description',
'label' => 'Descrizione',
'toolbarOptions' => [ [ 'header' => [1, 2, false] ], 'list-ordered', 'list-unordered', [ 'indent' => '-1'], [ 'indent' => '+1' ] ],
'placeholder' => 'Descrizione della categoria',
'editSource' => false,
])
@formField('tags', [
'label' => 'Proprietà',
])
@stop
class FoodItemController extends BaseModuleController
{
protected $moduleName = 'foodItems';
protected $indexColumns = [
'title' => [
'title' => 'Nome',
'field' => 'title',
],
'foodCategory' => [ // relation column
'title' => 'Categorie',
'sort' => true,
'relationship' => 'foodCategories',
'field' => 'title'
],
];
protected function formData($request)
{
return [
'foodCategories' => app()->make(FoodCategoryRepository::class)->listAll()
];
}
protected function indexData($request) {
return [
'foodCategories' => app()->make(FoodCategoryRepository::class)->listAll()
];
}
}
Please feel free to reopen an issue if you are still seeing this, but we haven't been able to reproduce.
Not selected on edit mode
Description
In edit mode, when I try to check a value of a multi select with dynamic values, the application is not responding anymore because Vue component hang in infinite loop
Steps to reproduce
Expected result
The checkbox change to checked
Actual result
The checkbox remain unchecked and the application is not responding anymore (hang in infinite loop and chrome ask to terminate the tab)
To discover the error I build Vue component in DEV mode following this twill guide
With dev mode enabled when I try to check a value from multi select the console show this error
The problem seems to be in the checkboxes,js code at set method that is called in infinite loop
Versions
Twill Version 2.8.2
Laravel version 7.3 & Laravel version 8.83.12
PHP version 7.4
Database MySQL
Tested in Google Chrome and Firefox