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

Add custom render? #30

Open
obykoo opened this issue Feb 26, 2017 · 1 comment
Open

Add custom render? #30

obykoo opened this issue Feb 26, 2017 · 1 comment

Comments

@obykoo
Copy link

obykoo commented Feb 26, 2017

Maybe you could add custom render function in future , because I would like to use it with Highlighter to highlight for searching word when not editing. I managed to make it work like this with workaround but , still could be good idea for custom rendering ;)

@kluzny
Copy link

kluzny commented Jul 22, 2017

https://github.com/kaivi/riek/blob/master/src/RIEStatefulBase.js#L86

What if we just did something like:

{...this.props.defaultProps}>{this.props.newValue || this.state.newValue || this.props.value}</span>;

Then you could pass in a newValue into the component, allowing you to modify what is present in the span vs what is passed to the input as value.

Personally, I have to run some ref voodoo to get some post render dom editing inside the components span <span> <span class='red'> Important! </span> value text goes here </span>

This seems like a low friction resolution, at least for my use case.

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

No branches or pull requests

3 participants