Skip to content

AtomicHandler function is not being executed #3

@serialbandicoot

Description

@serialbandicoot

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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions