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

Fix Editor to use editable.type #1323

Merged
merged 1 commit into from
May 17, 2017
Merged

Conversation

kawasin73
Copy link
Contributor

@kawasin73 kawasin73 commented May 16, 2017

We can use only 4 types for editable type, textarea, select, checkbox, and datetime. and other types will be ignored.
doc: http://allenfang.github.io/react-bootstrap-table/docs.html#editable

This is because of this commit. eslint on phase1

before: e5310fa#diff-5b70bae4672cdf3d71d9f592ff139d08L78

            //process other input type. as password,url,email...
            return(
                <input {...attr} type={type} defaultValue={defaultValue}/>
            )

after: e5310fa#diff-5b70bae4672cdf3d71d9f592ff139d08R87

      // process other input type. as password,url,email...
      return (
        <input { ...attr } type="text" defaultValue={ defaultValue }/>
      );

This PR will enable to use other input types like below.

render() {
    return (
      <BootstrapTable data={ hoges } cellEdit={ cellEditProp } insertRow={ true }>
          <TableHeaderColumn dataField='hoge' editable={ { type: 'number' } }>Hoge</TableHeaderColumn>
      </BootstrapTable>
    );
  }

Copy link
Owner

@AllenFang AllenFang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AllenFang
Copy link
Owner

@kawasin73, thanks 👍

@AllenFang AllenFang merged commit e3f87e0 into AllenFang:master May 17, 2017
@AllenFang
Copy link
Owner

Fixed on v3.3.5, thanks again 👍

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

Successfully merging this pull request may close these issues.

2 participants