Skip to content

Currency field only shows custom symbol on forms page #2932

@mattiasgeniar

Description

@mattiasgeniar
  • Laravel Version: 7.28.3
  • Nova Version: 3.11.1
  • PHP Version: 7.4.10

Description:

Given the following fields() content on a Nova resource:

Currency::make('Retainer')
                ->symbol('My Symbol')
                ->nullable()
                ->rules(['numeric','gt:0']),

This will only show the custom symbol() on the forms page, the detail & index page will default to the dollar symbol at all times.

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

I believe the cause can be found in:

  • vendor/laravel/nova/resources/js/components/Form/CurrencyField.vue
  • vendor/laravel/nova/resources/js/components/Index/CurrencyField.vue
  • vendor/laravel/nova/resources/js/components/Detail/CurrencyField.vue

Only the Form Vue component has logic to display the custom symbol, the Index and Detail do not have this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugVerified bug by the Nova team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions