Skip to content

Is there anyway to override file field #149

@haoflynet

Description

@haoflynet

When I want to override nova original file fields or use other public components about the file field, it will not work. I found this component compiles the original file fields into dist, and replace the original file filed using the modified one. So is there anyway to override it?

    /**
     * Set the custom component if need be.
     */
    protected function setComponent(Field $field)
    {
        if ($field instanceof BelongsTo) {
            $field->component = 'nested-form-belongs-to-field';
        } else if ($field instanceof File) {
            $field->component = 'nested-form-file-field';
        } else if ($field instanceof MorphTo) {
            $field->component = 'nested-form-morph-to-field';
        }

        return $field;
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions