Skip to content

fix(DataTable): type casting to string#687

Merged
paanSinghCoder merged 1 commit intomainfrom
fix/type-casting-datatable
Mar 12, 2026
Merged

fix(DataTable): type casting to string#687
paanSinghCoder merged 1 commit intomainfrom
fix/type-casting-datatable

Conversation

@paanSinghCoder
Copy link
Contributor

@paanSinghCoder paanSinghCoder commented Mar 10, 2026

Description

fix: Remove unsafe type casting

  • Removed a few unsafe type casting. A few others might break thus left them untouched for now.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactor (no functional changes, no bug fixes just code improvements)
  • Chore (changes to the build process or auxiliary tools and libraries such as documentation generation)
  • Style (changes that do not affect the meaning of the code (white-space, formatting, etc))
  • Test (adding missing tests or correcting existing tests)
  • Improvement (Improvements to existing code)
  • Other (please specify)

How Has This Been Tested?

[Describe the tests that you ran to verify your changes]

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (.mdx files)
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

Screenshots (if appropriate):

[Add screenshots here]

Related Issues

[Link any related issues here using #issue-number]

Summary by CodeRabbit

  • Bug Fixes
    • Improved handling of filter operations (contains, starts with, ends with) to properly support non-string data types in data tables, ensuring consistent case-insensitive comparisons across all value types.

@vercel
Copy link

vercel bot commented Mar 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
apsara Ready Ready Preview, Comment Mar 10, 2026 11:43am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 10, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b7f9e066-daf0-4f6a-8298-602dfb0ed170

📥 Commits

Reviewing files that changed from the base of the PR and between 14de0ba and 9215a9c.

📒 Files selected for processing (1)
  • packages/raystack/components/data-table/utils/filter-operations.tsx

📝 Walkthrough

Walkthrough

This change modifies string-based filter operations in the data-table utility to use explicit String() conversions instead of type assertions. The contains, starts_with, and ends_with filter operations now convert values to strings before performing case-insensitive comparisons, allowing non-string inputs to be handled more gracefully.

Changes

Cohort / File(s) Summary
String Filter Operations
packages/raystack/components/data-table/utils/filter-operations.tsx
Replaced type assertions (as string) with explicit String() conversions in contains, starts_with, and ends_with filter operations to ensure non-string values are properly converted before lowercase comparison.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A filter's quest with strings so bright,
No more assertions, casting's might!
String() converts with gentle care,
All values welcome, everywhere!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(DataTable): type casting to string' accurately describes the main change: converting unsafe type castings to explicit string conversions in the DataTable filter operations component.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/type-casting-datatable

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@paanSinghCoder paanSinghCoder changed the title fix: type casting to string fix(DataTable): type casting to string Mar 10, 2026
@paanSinghCoder paanSinghCoder self-assigned this Mar 10, 2026
@paanSinghCoder paanSinghCoder marked this pull request as ready for review March 10, 2026 15:10
@paanSinghCoder paanSinghCoder merged commit c79eb7e into main Mar 12, 2026
5 checks passed
@paanSinghCoder paanSinghCoder deleted the fix/type-casting-datatable branch March 12, 2026 06:10
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

Successfully merging this pull request may close these issues.

2 participants