armincms / json

A laravel nova field
MIT License
26 stars 2 forks source link

BooleanGroup Field is not loading values correctly #9

Open rhino-corey opened 3 years ago

rhino-corey commented 3 years ago

Laravel 8+ Nova 3.25

\Armincms\Json\Json::make('options', [
    BooleanGroup::make('Options')
    ->options( $this->getOptions() )
])->nullable()

This code will produce a JSON structure like so on save:

{"options":"{\"1\":false,\"2\":true,\"3\":true,\"4\":false,\"5\":false,\"6\":false,\"7\":false,\"8\":false,\"9\":false,\"10\":false}"}

However, when returning to the edit view, all values are selected as seen below:

image