Skip to content

Unusuable low performance on inline actions #3598

@andypooletrioteca

Description

@andypooletrioteca
  • Laravel Version: 8.41.0
  • Nova Version: 3.27.0
  • PHP Version: 7.4.16
  • Database Driver & Version: irrelevant
  • Operating System and Version: irrelevant
  • Browser type and version: irrelevant
  • Reproduction Repository: https://github.com/###/###

Description:

Action fields are being loaded for all instances of a resource even if it is declared as an inline or detail action. If a field needs to perform a query or needs a complex operation to define its default value or something similar, the action makes the list unusable. The action fields should be loaded when the action itself is being triggered for a given resource.

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

  1. Create an action with fields.
  2. Make a field load its default value by making a complex operation like querying the database or fetching some data through an API.
  3. Add the action to a resource setting it as an inline action or showing it only on display.
  4. On chrome devtools, check the response from the main call to the resource index: the action has been loaded for each resource with all of its fields already set.

Desired behaviour:

Fields of inline and detail actions should only be instanced after triggering the action itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    implementedFeature Request implementedrequestFeature Request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions