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

Search ignore content of hidden columns #528

Merged
merged 2 commits into from
May 17, 2021
Merged

Conversation

lamilsage
Copy link
Contributor

Goal of this pull request is to change the behavior of search plugin with hidden columns.

Currently, when typing a keyword, search plugin look for all cells including hidden one. It make the result a little bit strange to the final user seeing rows that does not contains his keyword.

This change only applies to in memory data (not server side).

@lamilsage
Copy link
Contributor Author

Hi @afshinm , can you look at this pr please ?

Copy link
Member

@afshinm afshinm left a comment

Choose a reason for hiding this comment

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

Thanks for sending this PR @lamilsage. I think it would be better if we could add an option to disable/enable this behavior (and I can see that the default should be "ignore the content").

import { PluginBaseComponent, PluginBaseProps } from '../../../plugin';

export interface SearchConfig {
keyword?: string;
enabled?: boolean;
debounceTimeout?: number;
selector?: (cell: TCell, rowIndex: number, cellIndex: number) => string;
columns?: OneDArray<TColumn | string | ComponentChild>;
Copy link
Member

Choose a reason for hiding this comment

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

I don't think you need to pass the columns to this component. Columns should be available in this.config.header...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did the change you asked. Can you check again please.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @afshinm , can you recheck the pr please?

@afshinm afshinm added the new feature New feature or request label May 3, 2021
@lamilsage lamilsage requested a review from afshinm May 6, 2021 07:00
@afshinm
Copy link
Member

afshinm commented May 6, 2021

Thank you @lamilsage. Could you please update the docs as well?

@lamilsage
Copy link
Contributor Author

Thank you @lamilsage. Could you please update the docs as well?

@afshinm I don't know where it is

@afshinm
Copy link
Member

afshinm commented May 6, 2021 via email

@lamilsage
Copy link
Contributor Author

Hi @afshinm, when do you plan to merge this pr ?

@afshinm afshinm merged commit ea49f29 into grid-js:master May 17, 2021
@afshinm
Copy link
Member

afshinm commented May 17, 2021

Thanks for the reminder @lamilsage

@lamilsage
Copy link
Contributor Author

Hi @afshinm, when do you plan to create a new package version so I can use this feature in my own project ?

@afshinm
Copy link
Member

afshinm commented Jun 1, 2021

@lamilsage sorry I have been busy restructuring the codebase. I will tag and release a new version soon.

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

Successfully merging this pull request may close these issues.

2 participants