Code Monkey home page Code Monkey logo

Comments (6)

pakcybershagufta avatar pakcybershagufta commented on September 22, 2024 2

Add
key_column: '_id'
in config object

from react-datatable.

ashvin27 avatar ashvin27 commented on September 22, 2024 1

Please add id as a key in your record collection.
Please refer example below:
[
{
"id": "55f14312c7447c3da7051b26",
"address": "228 City Road",
"address line 2": "Cardiff",
"name": ".CN Chinese"
},
{
"id": "55f14312c7447c3da7051b27",
"address": "376 Rayleigh Road",
"address line 2": "Essex",
"name": "@ Thai"
}
]

from react-datatable.

pakcybershagufta avatar pakcybershagufta commented on September 22, 2024 1

this.config = {
page_size: 20,
length_menu: [20, 40, 60],
show_filter: true,
show_first: true,
show_pagination: true,
key_column: 'booking_id',
button: {
excel: false,
print: false,
},
};

from react-datatable.

androidneha avatar androidneha commented on September 22, 2024

but I have _id in my table as per mongo db so my record is like
[
{
"_id": "55f14312c7447c3da7051b26",
"address": "228 City Road",
"address line 2": "Cardiff",
"name": ".CN Chinese"
},
{
"_id": "55f14312c7447c3da7051b27",
"address": "376 Rayleigh Road",
"address line 2": "Essex",
"name": "@ Thai"
}
]

from react-datatable.

ashvin27 avatar ashvin27 commented on September 22, 2024

Yes, but the plugin does not understand _id, its required id for every record.

from react-datatable.

androidneha avatar androidneha commented on September 22, 2024

Please update your library asap because mongo support _id not id so your library is not compatible with a feature rich MERN application.

from react-datatable.

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.