GriddleGriddle / Griddle

Simple Grid Component written in React
http://griddlegriddle.github.io/Griddle/
MIT License
2.5k stars 377 forks source link

Filter is not working. Getting no results #831

Open tareq0065 opened 6 years ago

tareq0065 commented 6 years ago

Griddle version

1.13.0 and 1.13.1

Expected Behavior

The filter textbox must have to work. After typing something must show results if matched.

Actual Behavior

When I am trying to type something the table showing "no results"

Steps to reproduce

just installed and added the common props and local plugin

Pull request with failing test or storybook story with issue

no

Here is my code I am trying to

<Griddle
                                    textProperties={{ filterPlaceholder: 'Search . . .' }}
                                    styleConfig={{
                                        icons: {
                                            TableHeadingCell: {
                                                sortDescendingIcon: <Icon type="up" />,
                                                sortAscendingIcon: <Icon type="down" />,
                                            },
                                        },
                                        classNames: {
                                            Row: 'ant-table-row  ant-table-row-level-0',
                                            Table: '',
                                            TableHeading: 'ant-table-thead',
                                            TableBody: 'ant-table-tbody',
                                            Filter: 'ant-input',
                                            PageDropdown: 'ant-select-selection ant-select-selection--single',
                                            NextButton: 'ant-btn ant-btn-primary',
                                            PreviousButton: 'ant-btn ant-btn-primary',
                                            Pagination: 'ant-pagination',
                                            Cell: 'griddle-cell',
                                            Loading: 'griddle-loadingResults',
                                            NoResults: 'griddle-noResults',
                                            RowDefinition: 'griddle-row-definition',
                                            Settings: 'griddle-settings',
                                            SettingsToggle: 'griddle-settings-toggle',
                                            TableHeadingCell: 'griddle-table-heading-cell',
                                            TableHeadingCellAscending: 'griddle-heading-ascending',
                                            TableHeadingCellDescending: 'griddle-heading-descending',
                                        },
                                        styles: {
                                            Table: {},
                                        }
                                    }}
                                    enableSettings={false}
                                    events={{
                                        onFilter: (filterText) => {},
                                        onSort: (sortProperties) => {},
                                        onNext: () => {},
                                        onPrevious: () => {},
                                        onGetPage: (pageNumber) => {},
                                    }}
                                    data={this.state.filedata}
                                    plugins={[plugins.LocalPlugin]}
                                />
dahlbyk commented 6 years ago

Interesting. What's the shape of your filedata? The filter tests in the Storybook work for me; can you confirm?