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

filterPlaceholder property is not working in extended table #26

Closed RanjithaRaja closed 5 years ago

RanjithaRaja commented 5 years ago

@Imballinst filterPlaceholder property is not working while extending the table. But it's working in a Basic data table.

imballinst commented 5 years ago

OK, I can reproduce this. The README is wrong (again, duh) -- we need to pass another prop to Filter component like this: https://codesandbox.io/s/kmzm5wkjlo

<Filter
  tableHeader={tableHeader}
  onChangeFilter={this.onChangeFilter}
  filterText={filterText}
  keyName={keyName}
  // Need to pass this prop.
  placeholder={labels.filterPlaceholder}
/>

Will update the README, and I think I will make an extensive README for each component as well. Thanks for reporting and please let me know if the above solution doesn't work!

While we're at it, what is your experience on extending the table? What difficulties do you face? Kinda want to know from your perspective and how I can make it easier for the users of this library.

RanjithaRaja commented 5 years ago

@Imballinst Yeah it's working fine. Thanks for helping.

Better you will make one live demo and attach the link in the README file. Because everyone will get a clear idea.

imballinst commented 5 years ago

Cool! Makes sense -- thanks for your feedback!

RanjithaRaja commented 5 years ago

@Imballinst Showing current entries are not available in this version. (Ex:https://screenshots.firefox.com/1QAvGUxvxqyGtp5M/mdbootstrap.com)

If it is available, please give me the code

imballinst commented 5 years ago

For clarification: is it this part? (the text and numbers)

image

RanjithaRaja commented 5 years ago

Yes

imballinst commented 5 years ago

Somewhere like this? https://codesandbox.io/s/zqqz25lrrp

RanjithaRaja commented 5 years ago

Yeah

imballinst commented 5 years ago

Cool! Does that work for you?

Signature reference to https://github.com/Imballinst/react-bs-datatable/issues/28 so I don't forget to document this kind of thing in README later.

RanjithaRaja commented 5 years ago

@Imballinst Thank you so much!

RanjithaRaja commented 5 years ago

Hi,

I am having a small issue. Please refer the screenshot https://prnt.sc/ndmp91

Exactly what I need is, it should display current value (Example: Displaying 11 to 20 of 57 entries). But every time it is Displaying 1 to 10 of 57 entries

imballinst commented 5 years ago

Could you try this one? https://codesandbox.io/s/zqqz25lrrp

RanjithaRaja commented 5 years ago

it's working fine, But the last pagination it's showing wrong data.

For that, I have modified a little bit your code

Displaying {(currentPage - 1) rowsPerPage + 1} to{" "} {(currentPage - 1) rowsPerPage + paginatedData.length} of {filteredData.length} entries

Try this, please let me know if it is any corrections.

imballinst commented 5 years ago

Ah, correct. I missed the last page, your updated code is better, awesome!

RanjithaRaja commented 5 years ago

Thank you so much for helping the right time!

imballinst commented 5 years ago

No worries! Cheers