laravel/nova-issues

MultiSelect Form Field - unexpected option key cast

whipsterCZ opened this issue · 1 comments

Laravel Version: 10.39
Nova Version: 4.33
PHP Version: 8.2
Database Driver & Version: Mysql 8
Operating System and Version: macos 13.4.1
Browser type and version: Safari 16.5.2

Description:

Nova/Field/MultiSelect - it doesn't work with options keyed by Integer values ( @see #6350 )

But when i try to use "String Keyed Options", it does work in DetailField but doesn't work at FormField.
Options has modified data-type of Option Key… !!!

Please look at attached screenshot -

PastedGraphic-1

Detailed steps to reproduce the issue on a fresh Nova installation:

  1. make options with string Key.
  2. When inspecting network is it clear that option has different keys...

This will be fixed via #6350

It is expected that 2 will be transformed to 2 to make the code "compatible" with potentially used with ID and "asBigInt": https://nova.laravel.com/docs/resources/fields.html#id-field