Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Props not Working #829

Open
pedrosimao opened this issue Aug 15, 2018 · 3 comments
Open

Props not Working #829

pedrosimao opened this issue Aug 15, 2018 · 3 comments

Comments

@pedrosimao
Copy link

Griddle version

1.8.0

Expected Behavior

Settings Toggle and Filter to respond to Props settings

Actual Behavior

Nothing changes

Steps to reproduce

I am currently using Griddle like this:
<Griddle
data={this.fakeData}
styleConfig={styleConfig}
plugins={[plugins.LocalPlugin]}
filterPlaceholderText={'search users'}
showSettings={false}
showFilter={false}
enableToggleCustom={false}
/>

Settings Toggle buttons still appear on screen.
The same goes for "Filter" input box.
Also text inside filter input is still the default value and not 'search users'.

Am I facing a version difference problem?

@dahlbyk
Copy link
Contributor

dahlbyk commented Aug 15, 2018

It looks like you're using a few Griddle v0 props?

showSettings={false}

Try enableSettings={false} (cc #816).

filterPlaceholderText={'search users'}

You can use textProperties={{ filterPlaceholder: 'search users' }} since v1.13.1, or to avoid an upgrade you can override Filter/FilterContainer with their changes from #780.

showFilter={false}

We don't currently have an equivalent prop for this. The easiest way to hide the filter is to swap in a component that renders nothing: components={{ Filter: () => null }}. We'd certainly accept a PR to make this more intuitive.

@pedrosimao
Copy link
Author

Thanks a lot for your very fast answer! It all works now!
Actually, it is not easy to find updated documentation.
Any plans for that?

@dahlbyk
Copy link
Contributor

dahlbyk commented Aug 17, 2018

http://griddlegriddle.github.io/Griddle/docs/ is incomplete, but it shouldn't be wrong. If it is, we would like to fix that.

The best documentation is honestly the Storybook. But we would be glad for any assistance in updating either to make the project easier to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants