GithubHelp home page GithubHelp logo

Comments (4)

AllenFang avatar AllenFang commented on June 8, 2024

The hook for delete and create row is great, it's a good enhancement for this component. And your are right, the ID field always generated from server, so the ID field need to be not editable. However, I will spend some time to implement these feature. Thanks for your feedback :)

from react-bootstrap-table.

AllenFang avatar AllenFang commented on June 8, 2024

Hi @ryanlinnane , I've add the hook for delete and create row on table, the example as follow:

var options = {
  afterDeleteRow: onAfterDeleteRow,  // A hook for after droping rows.
  afterInsertRow: onAfterInsertRow   // A hook for after insert rows
};
//...
<BootstrapTable data={products} options={options}>
  //...
</BootstrapTable>

And about the field limitation in modal for row creation, I've not yet implement it. Maybe in next version :)

from react-bootstrap-table.

AllenFang avatar AllenFang commented on June 8, 2024

HI @ryanlinnane , about the field limitation in modal for row creation, I think the editable={false} on TableHeaderColumn is a good idea to achieve. But about the row key field, in my opinion, I want make it editable, because the data cant be store without row key. So if you want to make the key field non-editabled, I prefer you create the new row outside, save it and render react-bootstrap-table again :) Anyway, I'll add the editable field in modal in next version.

from react-bootstrap-table.

AllenFang avatar AllenFang commented on June 8, 2024

HI @ryanlinnane, in 1.0.0, you can use editable={false} on <TableHeaderColumn> to limit the field in modal. if rowkey, you can use <TableHeaderColumn dataField="id" isKey={true} autoValue={true}>Job ID</TableHeaderColumn> to make row key can't be input and auto generate a key for unique identify in this component.

from react-bootstrap-table.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.