Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there anyway to override file field #149

Open
haoflynet opened this issue Dec 15, 2021 · 0 comments
Open

Is there anyway to override file field #149

haoflynet opened this issue Dec 15, 2021 · 0 comments

Comments

@haoflynet
Copy link

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;
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant