reactabular / searchtabular

Search utilities (MIT)
MIT License
5 stars 17 forks source link

Add toggle for rendering search input in columns #16

Closed chromakey closed 6 years ago

chromakey commented 6 years ago

Apologies in advance since I'm not much of a React/Javascript guy.

Problem: Using in conjunction with reactabular will cause every column to render a search input field, regardless of whether or not you would like that column to be searchable.

This PR Addresses It By: We examine the column object to check for a "filterable" property. For backwards compatibility, if the property doesn't exist, the search input field is rendered as usual. If the property does exist and it's value is true, we render if the search input field as usual. If the property exists and is set to false, we do not render the search input field.

I welcome any and all feedback. Thanks for your time and hard work on this library.

codecov-io commented 6 years ago

Codecov Report

Merging #16 into master will not change coverage. The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #16   +/-   ##
=======================================
  Coverage   89.52%   89.52%           
=======================================
  Files          11       11           
  Lines         191      191           
  Branches       77       77           
=======================================
  Hits          171      171           
  Misses         19       19           
  Partials        1        1
Impacted Files Coverage Δ
src/components/search-columns.js 25% <0%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d4346e1...75c5259. Read the comment docs.

bebraw commented 6 years ago

Thanks. I added some docs and published as 1.8.0.