imballinst / react-bs-datatable

Bootstrap datatable without jQuery. Features include: filter, sort, pagination, checkbox, and control customization.
https://imballinst.github.io/react-bs-datatable
MIT License
59 stars 20 forks source link

Custom Pagination position in 2.0.5-alpha.2 #54

Closed masnoonmulla closed 4 years ago

masnoonmulla commented 4 years ago

I needed pagination position in bottom right and need to display current entries... IN V.2.0.5-alpha.2

imballinst commented 4 years ago

Does this fit your need? https://imballinst.github.io/react-bs-datatable/?path=/story/advanced-guides--extending-the-table

You'll need to "compose" the table a bit -- but at the end of the day, it will result in the same experience.

masnoonmulla commented 4 years ago

Thank You @Imballinst ... Displaying {(currentPage - 1) rowsPerPage + 1} to{" "} {(currentPage - 1) rowsPerPage + data.length} of{" "} {data.length} entries I need a small help in this code how to display total entries in above code.. dataTAble

imballinst commented 4 years ago

@masnoonmulla could you try this? so instead of data.length -- use props.tableBody.length.

It's because data returned from useTableLifecycle is the data that we have sorted, filtered, and paginated. props.tableBody contains the "raw" data that you pass to the table. Let me know if this works!

masnoonmulla commented 4 years ago

Thank You so much @Imballinst for your help.. Its work

imballinst commented 4 years ago

Awesome @masnoonmulla! Let me know if you need further help.

masnoonmulla commented 4 years ago

Yeah sir how to pass mulitple prop in headers array Eg, { title: "OWNER", prop: "name,mobile", sortable: true, filterable: true },
in attached file there is two lables Owner Name & Mobile i need to display in one td with lables, And data is like , [ { id:1, date:20/10/20 owner_details:{ name:ABC, mobile:1234567890 }, created_at:"" }, ] new_eg

imballinst commented 4 years ago

oooh -- that. Unfortunately currently this library doesn't support column spanning (yet). But that is a good idea. Let's track it in different issue.