Skip to content

Conversation

@teboho
Copy link
Contributor

@teboho teboho commented Jan 27, 2026

#3516 (comment)

Summary by CodeRabbit

  • Improvements
    • Data table components now intelligently adapt column handling and validation behavior based on the backend data source type, enabling better support for different data source configurations
    • Enhanced column registration and auto-configuration logic with context-aware adjustments that respect the source type

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 27, 2026

Walkthrough

This PR adds repository-type awareness to data table components by gating column loading, validation, and registration logic based on whether the data source is an entity. The changes introduce conditional checks across multiple designer components and utility functions to selectively apply auto-configuration and validation.

Changes

Cohort / File(s) Summary
Data table designer components
shesha-reactjs/src/designer-components/dataTable/table/columnsEditor/columnsEditorModal.tsx, tableComponent.tsx, tableWrapper.tsx
Introduces isEntitySource flag derived from repositoryType to gate column loading, validation, and registration logic; updates dependency arrays to re-evaluate on repository type changes; tableWrapper adds shouldRegisterColumns logic to control registration and auto-configuration
Data table utilities
shesha-reactjs/src/providers/dataTable/utils.ts
Adds resolvedPropertyName computation for data-column props; uses it to derive userColumnId, select server columns, and populate column fields instead of direct column.propertyName usage

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~23 minutes

Possibly related PRs

Suggested reviewers

  • James-Baloyi
  • AlexStepantsov

Poem

🐰 Repository types now guide the way,
Entity or not—we'll gate or play!
Through columns and validation flows,
Data tables dance where logic goes! ✨

🚥 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 auto config for columns' accurately summarizes the main change across all modified files, which involves fixing auto-configuration logic for datatable columns by adding repository-type awareness and conditional column registration/loading.
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

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
shesha-reactjs/src/designer-components/dataTable/table/columnsEditor/columnsEditorModal.tsx (1)

18-18: Avoid any type; use a specific function signature.

The onChange prop is typed as any, which violates the coding guideline to eliminate the any type. Use a proper function type instead.

♻️ Suggested fix
-  onChange?: any;
+  onChange?: (columns: ColumnsItemProps[]) => void;

As per coding guidelines, eliminate the any type and use explicit type definitions.

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.

1 participant