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

Allow injecting a custom renderer class #166

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

apauly
Copy link
Contributor

@apauly apauly commented Jun 24, 2020

This PR does not really alter the behaviour of the gem, but it allows easier implementation for custom behaviour.

  • The component helper optionally accepts a custom renderer class
  • The ComponentRenderer itself has been refactored a bit to allow customization of property assignment

Use case:
We'd like to use komponent in a setup where we need to customize the property assignment to enable localization (including inline editing).
The changes in this PR would implement an interface for customization only - without binding to a special kind of customization.

Note: The .rubocop.yml change is due to a warning by rubocop itself

@Spone
Copy link
Collaborator

Spone commented Jun 25, 2020

Thanks @apauly for your contribution. We'll review it shortly.

Would you mind adding documentation about this change in the README?

@apauly
Copy link
Contributor Author

apauly commented Jul 3, 2020

Hi @Spone ,

sorry for the delayed response - I've now added a section to the README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants