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

AtomicHandler function is not being executed #3

Open
serialbandicoot opened this issue Nov 28, 2017 · 0 comments
Open

AtomicHandler function is not being executed #3

serialbandicoot opened this issue Nov 28, 2017 · 0 comments

Comments

@serialbandicoot
Copy link

Hi,

For some reason the AtomicHandler function is not being called. Can you please let me know what I'm doing incorrectly.


render() {
 return (
 <RNDraftJSRender contentState={this.state.content}
                               atomicHandler={atomicHandler}
                               customStyles={contentStyles}
                                />
.
.
.

Above the class I have the following:

const atomicHandler = (item: Object): any => {

   console.warn('made it here!');

    switch (item.data.type) {
        case 'image':
            return (
                <View key={item.key} style={{ flex: 1 }}>
                    <Image
                        style={{ width: 288, height: 161 }}
                        source={{ uri: item.data.url }}
                    />
                </View>
            );
        default:
            return null;
    }
};

However the atomicHandler function is never executed. Any suggestions?

Great library btw...

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