moonshine-software / moonshine

Laravel Admin panel and more. Simple for beginners and powerful for experts. Using Blade, Alpine.js and Tailwind CSS.
https://moonshine-laravel.com
MIT License
714 stars 94 forks source link

Поле Json переставляет при сохранении #1187

Closed povly closed 3 weeks ago

povly commented 4 weeks ago

Description

Вот имеются вложенные поля такие: image

При сохранении как будто переставляет на новый элемент, хотя там закрыто и можно только один раз добавить - creatable(false). По логике переставляет индексы Скрин: image

Код: Json::make('Помощь', 'content.support') ->fields([ Textarea::make('Текст', 'description'), Json::make('Список', 'lists') ->fields([ Text::make('Заголовок', 'title'), Json::make('Текст', 'text')->fields([ Textarea::make('Текст', 'title')->unescape(), Textarea::make('Текст', 'description')->unescape(), ])->removable(), ])->removable() ]) ->vertical() ->removable() ->customWrapperAttributes([ "x-show" => "template_page == 'support'", ])->creatable(false),

Casts: protected $casts = [ 'content' => 'array' ];

povly commented 3 weeks ago

Может из-за этого image