twisty / formsy-react-components

Bootstrap components for a formsy-react form.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Textarea element is always null 1.0a2

timothyallan opened this issue · comments

commented

On 1.0alpha2, I'm finding that the element component of my TextArea is always null.

<Textarea
          ref={obj => {
            this.textarea = obj;
          }}
          componentRef={node => {
            this.textareaComponent = node;
          }}
          name={this.props.name}
          disabled={this.props.disabled}
          onChange={this.handleOnChange}
          onBlur={this.handleOnBlur}
          onFocus={this.props.onFocus || undefined}
          placeholder={this.props.placeholder || undefined}
          validations={validations}
          validationErrors={validationErrors}
          value={this.props.value || ''}
          layout="elementOnly"
          style={noRowScrollStyle}
        />

Referencing this.textareaComponent, I see it's a proper
object, but the element portion always reports null, even though it's on screen.

screen shot 2017-09-13 at 4 05 59 pm

Okay, good catch. Fix incoming. Will make an alpha 3 release within the next day or so.

commented

Great! My un focused TextAreas await.

Fixed in latest releases.

commented

Thanks! Just got a chance to try the latest version and am now getting Uncaught TypeError: (0 , _formsyReact.Wrapper) is not a function... because .Wrapper ain't there!

screen shot 2017-09-17 at 3 41 35 pm

"formsy-react": "^0.19.5",
"formsy-react-components": "^1.0.0-alpha.4",

edit: this error doesn't happen in 1.0alpha2

Try using version ^1.0.0 (or @beta) for the formsy-react dependency. (I should probably add this as a peerDependency).

commented

Ah, didn't even realize they had a beta going. After much futzing around with the breaking changes to the HOC in 1.0.0 beta, that seems to have fixed the Wrapper error! Thanks for pointing me in the right direction.