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

[Enhancement] Fixed issue #447 (Search box - Default Text) #852

Conversation

alielkhateeb
Copy link
Contributor

fix #447
Added searchPlaceholder option to TableSearch.js

@coveralls
Copy link

coveralls commented Aug 21, 2019

Coverage Status

Coverage decreased (-0.1%) to 75.223% when pulling b60da00 on alielkhateeb:enhancement/issue-447-Search-box-default-text into 8438fe3 on gregnb:master.

@gabrielliwerant
Copy link
Collaborator

I think this is a useful option, however, I'll have to give some thought to the API.

@gabrielliwerant gabrielliwerant added the needs review Useful to mark PRs for what's up next to review label Aug 21, 2019
Copy link
Collaborator

@gabrielliwerant gabrielliwerant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feature has been needed for a long time, great job in providing that.

My only nitpick is that I think we can fold this option into an existing example to prevent example bloat.

My concern with the API is that, as it grows in size, it becomes more difficult to find what options are available. Some of that could be helped by better documentation, but there might also be a case to combine some options into their own object/namespaces as we do with some others, however, I don't think that's necessary here, at least not yet. Just wanted to explain my thinking on it.

README.md Outdated
@@ -166,6 +166,7 @@ The component accepts the following props:
|**`filter`**|boolean|true|Show/hide filter icon from toolbar
|**`search`**|boolean|true|Show/hide search icon from toolbar
|**`searchText`**|string||Initial search text
|**`searchPlaceholder`**|string||Search text placeholder. [Example](https://github.com/gregnb/mui-datatables/blob/master/examples/customize-search-placeholder/index.js)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be overkill to add a whole new example just for this feature. What if we added it to customize-search instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes true, I agree
I thought it was a convention to add examples for everything haha but it makes sense not to.
I'll do the changes today :) Thanks for your time.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries! There's no hard convention for it, it's more a matter of, is there enough new functionality to justify a new example, or can it be squeezed in elsewhere. It's a more a feeling. :p

Thank you for working on this!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha no problem, I'm open for more issues to work on, I can just pick any non assigned issue, correct?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The best ones would be those marked "bug" or "help wanted" that haven't yet been assigned. If in doubt, @-me in the comments and ask what I think and I'll get back to you within a day.

@gabrielliwerant gabrielliwerant added needs work new feature and removed needs review Useful to mark PRs for what's up next to review labels Aug 28, 2019
Deleted examples/customize-search-placeholder
Added searchPlaceholder to examples/customize-search instead
Updated documentation Example link
@gabrielliwerant gabrielliwerant merged commit 2320b0d into gregnb:master Aug 29, 2019
@alielkhateeb alielkhateeb deleted the enhancement/issue-447-Search-box-default-text branch August 30, 2019 00:16
mrcrane pushed a commit to DefinitelyTyped/DefinitelyTyped that referenced this pull request Sep 24, 2019
table option was merged in release 2.10.0
gregnb/mui-datatables#852
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Search box - Default Text
3 participants