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

Can not set item in "+New" when setting the column attribute editable={false} #380

Closed
simozhan opened this issue Mar 31, 2016 · 6 comments
Closed

Comments

@simozhan
Copy link

Hi,

When i set a TableHeaderColumn's attribute editable={false}, i can not set the value in new item.
My expectation is i can not edit the column in the table, but when i want to add a new record, i can input value for the column.

Much appreciation for any help.

@simozhan
Copy link
Author

It seems my issue is the same with this one (#226). So do we have any plan for this feature in near future?

@AllenFang
Copy link
Owner

@simozhan, I know this condition, This rule I follow the jqgrid and DataTables which are both familiar jQuery table component. But I think I can do some improvement like setting a prop to make you to choose the editable condition when adding row.

@simozhan
Copy link
Author

@AllenFang ok. i got the point. Many thanks. Yes, if it can be supported natively, that's really awesome, but no hurry, i am just trying to add a New Modal as you suggested in (#226)

@AllenFang
Copy link
Owner

@simozhan, actually, most of user of react-bootstrap-table does not use insertRow, they custom a modal for adding a new rows by themself, so if you can custom it is best condition, because you can control everything.

Thanks 👍

AllenFang added a commit that referenced this issue Apr 1, 2016
@AllenFang
Copy link
Owner

@simozhan, on newest v2.1.1, you can use following config to ignore editable on insert

const options = {
   ignoreEditable: true
};

return (
      <BootstrapTable data={ products } 
          cellEdit={ cellEditProp } 
          insertRow={ true } 
          options={ options }>
          //.....
    );

@simozhan
Copy link
Author

simozhan commented Apr 3, 2016

@AllenFang Many many thanks for quickly fix! Awesome!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants