Skip to content

Wrapped react-widgets' NumberPicker does not work #2

Description

@pfuerholz

Hi,
I find your react-traverse library really cool and I was able to use it successfully. Unfortunately I now stumbled about a component which does not proper work when traversed even if no modification is applied.
Here is the case (see attachment):

  • Two NumberPicker components (from 'react-widgets' lib)
    are on the screen, first one w/o wrapping, second is wrapped.
  • If you click into the second input field following error appears in the console:
    Uncaught TypeError: Cannot read property 'focus' of null
  • Looking into NumberPicker it seems that following code does not work:
    focus() {
        compat.findDOMNode(this.refs.input).focus()
    },
  • Investigating this I expected that 'refs' might get confused by the use of react-traverse and thus added a test using refs: With component 'SimilarNumberPicker' I tried to readjust this case: But here refs work after wrapping!

Do you have an idea why NumberPicker does not work after the wrapping?
Thanks for your thoughts!

ReactWidgetsWithTraverse.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions