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

Filter operators isEmpty and isNotEmpty are Non-functional #384

Closed
krukrue opened this issue Feb 22, 2024 · 2 comments
Closed

Filter operators isEmpty and isNotEmpty are Non-functional #384

krukrue opened this issue Feb 22, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@krukrue
Copy link

krukrue commented Feb 22, 2024

I prepared demo to show it:
https://stackblitz.com/edit/table-filter-row-custom-editor-ts-vpjndu?file=Demo.tsx

Tip for improving https://github.com/komarovalexander/ka-table/blob/master/src/lib/Utils/CommonUtils.ts - in isEmpty function would be good to compare not only null or empty array, but empty string also.

Thank you.

@krukrue krukrue changed the title Filter operators isEmpty and isNotEmpty Non-functional Filter operators isEmpty and isNotEmpty are Non-functional Feb 22, 2024
@komarovalexander
Copy link
Owner

komarovalexander commented Feb 22, 2024

Hi @krukrue thanks for example, I will investigate it.
btw isEmpty works correctly as value.length === 0 is an empty string check also, maybe not so obvious - but it is covered by tests and do not see the reason to write (value.length === 0 || value =='') as both comparisons do the same

komarovalexander added a commit that referenced this issue Feb 22, 2024
Fix isEmpty and isNotEmpty filter operators #384
@komarovalexander
Copy link
Owner

komarovalexander commented Feb 22, 2024

@komarovalexander komarovalexander self-assigned this Feb 22, 2024
@komarovalexander komarovalexander added the bug Something isn't working label Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants