Skip to content

fix: highlight only empty required fields in table edit mode (issue #785)#786

Merged
ideav merged 3 commits intomainfrom
issue-785-d35bde6e4868
Mar 10, 2026
Merged

fix: highlight only empty required fields in table edit mode (issue #785)#786
ideav merged 3 commits intomainfrom
issue-785-d35bde6e4868

Conversation

@konard
Copy link
Copy Markdown
Collaborator

@konard konard commented Mar 10, 2026

🤖 AI-Powered Solution

Fixes #785

📋 Problem

PR #780 introduced highlightRequiredCells() to visually highlight required fields (columns with :!NULL: in their attrs) when a user enters edit mode for a row. However, it highlighted all required fields, including those that already have a value filled in.

✅ Fix

Modified highlightRequiredCells() in js/integram-table.js to only add the required-field-editing CSS class to cells that are currently empty. This is done by calling the existing extractCellValue(td) method and skipping the highlight if the value is non-empty.

if (column && column.attrs && column.attrs.includes(':!NULL:')) {
    // Only highlight if the cell is currently empty (issue #785)
    const currentValue = this.extractCellValue(td);
    if (!currentValue) {
        td.classList.add('required-field-editing');
    }
}

📁 Files Changed

  • js/integram-table.js — added empty-value check before applying required-field-editing class

This PR was created automatically by the AI issue solver

Adding .gitkeep for PR creation (default mode).
This file will be removed when the task is complete.

Issue: #785
@konard konard self-assigned this Mar 10, 2026
)

Previously, highlightRequiredCells() highlighted all required fields
(:!NULL: in attrs) when entering edit mode. This fix modifies it to
only highlight required fields that are currently empty, so already-
filled fields are not highlighted unnecessarily.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@konard konard changed the title [WIP] Исправь https://github.com/ideav/crm/pull/780, чтобы подсвечивались только те поля, которые сейчас пустые fix: highlight only empty required fields in table edit mode (issue #785) Mar 10, 2026
@konard konard marked this pull request as ready for review March 10, 2026 10:17
@konard
Copy link
Copy Markdown
Collaborator Author

konard commented Mar 10, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $0.405820
  • Calculated by Anthropic: $0.343760 USD
  • Difference: $-0.062061 (-15.29%)
    📎 Log file uploaded as Gist (1200KB)
    🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Copy Markdown
Collaborator Author

konard commented Mar 10, 2026

✅ Ready to merge

This pull request is now ready to be merged:

  • No CI/CD checks are configured for this repository
  • No merge conflicts
  • No pending changes

Monitored by hive-mind with --auto-restart-until-mergeable flag

@ideav ideav merged commit 1f30178 into main Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants