Git Product home page Git Product logo

react-table-filter's People

Contributors

cheekujha avatar ltprashant avatar nehalsanghvi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

react-table-filter's Issues

javascrpt demo

can give a demo, how to use in html, not vue or react?

Include ts module

When I am trying to include the library with TSX file. It throws module is not available as it's is completely written in jsx.

Can you please include declare module to make the reference easier.

index.d.ts declare module 'react-table-filter': any....

Thanks in advance

react-table-v6 + react-table-filter

I'm trying to integrate react-table-filter with react-table-v6.

the goal is to give all the column data to rows in , but I can't send it only the column, every time it send all of the table. I may have other errors (for the filter) because I can't test it yet.

Here is my code:

import React, { Component } from "react";
import ReactTable from "react-table-v6";
import TableFilter from 'react-table-filter';

export default class Table extends Component {
  constructor(props) {
    super(props)

    this.state = {
      data: [],
    };

    this.columns = [
      {
        accessor: "id",
        Header: "Id",
      },
      {
        accessor: "age",
        Header: "Age",
        filterMethod: (filter, row) => {
          return row[filter.id] === filter.value;
        },
        Filter: ({ }) =>
          this.customFilter({ fieldName: 'age' })
      },
    ]
  }

  customFilter = ({ fieldName }) => {
    return (
      <TableFilter
        rows={this.state.data}
        onFilterUpdate={this.filterUpdated}
      >
        {this.state.data
          .map(item => item[fieldName])
  
          .filter((item, i, s) => s.lastIndexOf(item) === i)
          .map(function (value) {
            if (value === null)
              return;
            else {
              return (
                <th filterkey={value}>
                  {value}
                </th>
              );
            }
          })}
      </TableFilter>
    );
  }

  filterUpdated = (newData, filterConfiguration) => {
    this.setState({
      "data": newData
    });
  }

  componentDidMount() {
    UserService.getData()
    .then(response => {
      this.setState({
        data: response.data, // all data are store here
      })
    })
    .catch((err) => console.error(err))
  }

  render() {
    return (
      <div>
        <ReactTable
          data={this.state.data}
          filterable
          columns={this.columns}
          pageSizeOptions={[10, 30, 50, 100]}
          className="-striped -highlight"
          defaultPageSize={10}
        />
      </div>
    )
  }
}

Select all is not working on filtered data

There are few cases can't click Select all button.

Current behavior:
Scenario 1

  1. Unselect all results from filter
  2. Start typing to filter results
  3. Try to select all by check Select all

Scenario 2

  1. Start filtering by input field inside filter dropdown
  2. Uncheck some of the elements
  3. Try to select all by top option Select all

Expected behavior:
User should be able to select/unselect all element on filtered data.

Preview of the issue - http://recordit.co/aXW2IhRur8

Getting blank screen on IE browser while trying to access Demo

I am unable to see the content (getting a blank screen) of demo https://cheekujha.github.io/react-table-filter/ for IE browser where I checked with versions 10 and 11. I have added the screen shots of the same below. Can you please let me know how to fix this? Is there any configuration or settings for IE (It works fine in Chrome and Edge browsers) or any limitation for IE? Awaiting for your reply on this ASAP.
react-table-filter-IE.docx

Not working in IE 11.12 version and warning in all browers

HTML1300: Navigation occurred.
react-table-filter
DOM7011: The code on this page disabled back and forward caching. For more information, see: http://go.microsoft.com/fwlink/?LinkID=291337
react-table-filter
Warning: Each child in an array or iterator should have a unique "key" prop.

Check the top-level render call using . See https://fb.me/react-warning-keys for more information.
in tr
in Unknown
--_applyInitialFilters- [object Object]
"--_applyInitialFilters-"
{
[functions]: ,
proto: { }
}
BELOW Error in IE Only
The above error occurred in one of your React components:
in Unknown
in thead
in table
in div
in div
in div
in Unknown

Consider adding an error boundary to your tree to customize error handling behavior.
You can learn more about error boundaries at https://fb.me/react-error-boundaries.
SCRIPT65535: Invalid calling object
bundle.js (430,2)
SCRIPT65535: Invalid calling object
bundle.js (8133,25)

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.