-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
bugSomething isn't workingSomething isn't working
Description
- Laravel Version: #.#.#
-
"laravel/framework": "^8.0", - Nova Version: #.#.#
"laravel/nova": "^3.10", - PHP Version: #.#.#
"php": "^7.4",
Description:
When a Currency field is used and another field is used with inline-text->updateOnIndex()
the value of the currency field is not set on the record when saved but is updated to null.
Detailed steps to reproduce the issue on a fresh Nova installation:
Create a test nova resource with the following fields
public function fields(Request $request)
{
return [
ID::make(__('ID'), 'id'),
Currency::make('CPL', 'cost_per_lead')
InlineText::make('Leads', 'qualified_leads_count')
->inlineOnIndex(),
];
}
I've added updateRules('sometimes') on CPL with no changes - it isn't a required field.
If the CPL data field is not nullable it generates a MySQL error on update - if it is nullable it is set to null
In the same example if you replace Currency with Number it works normally.
If you make Currency read only it works normally.
If you try and hack it by using two fields and onlyOnForms/ExceptOnForms to make it still is updated to null.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working