Skip to content

MultiSelect Field: No way to stop default selections from over writing replicated selections #4488

@electrictomcat

Description

@electrictomcat
  • Laravel Version: 9.18.0
  • Nova Version: 4.10.1
  • PHP Version: 8.1.7
  • Database Driver & Version: mysq: 8.0.29 for macos12.2 on arm64

Description:

I am using resolveUsing() to populate the values of a MultiSelect field when updating a resource, and I am also using different logic in default() when creating a new resource.

When you replicate a resource the default values of the MultiSelect field will over-write the replicated values.
This seems to occur because both resolveUsing and default will run for replication.

Can there be a toggle on default() to say notOnReplicate()?

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

Create a MultiSelect field using both resolveUsing and default.
Duplicate a resource using that field, and the default values will override the replicated values.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions