Skip to content

Commit ff31872

Browse files
willwadeclaude
andcommitted
Remove AutoContent ContentType when adding static content
When modifying cells that were originally AutoContent/WordList cells, remove the ContentType and ContentSubType attributes so Grid 3 will display the static Caption instead of trying to populate the cell dynamically from a WordList. This fixes the issue where modified cells appeared blank because Grid 3 was seeing ContentType="AutoContent" and ignoring the static Caption. Co-Authored-By: Claude (glm-4.7) <noreply@anthropic.com>
1 parent c716331 commit ff31872

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

src/processors/gridsetProcessor.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2605,6 +2605,19 @@ class GridsetProcessor extends BaseProcessor {
26052605
}
26062606
}
26072607

2608+
// CRITICAL: Remove ContentType and ContentSubType when adding static content
2609+
// Grid 3 sees ContentType="AutoContent" and tries to populate dynamically,
2610+
// ignoring the static Caption. We must remove these to show static content.
2611+
if (cell.Content.ContentType === 'AutoContent' ||
2612+
cell.Content.ContentSubType === 'WordList' ||
2613+
cell.Content.ContentType === 'AutoContent' ||
2614+
cell.Content.ContentSubType === 'WordList') {
2615+
delete cell.Content.ContentType;
2616+
delete cell.Content.ContentSubType;
2617+
delete cell.Content['ContentType'];
2618+
delete cell.Content['ContentSubType'];
2619+
}
2620+
26082621
// Update the message if different from label
26092622
if (modifiedButton.message && modifiedButton.message !== modifiedButton.label) {
26102623
// For simple text content

0 commit comments

Comments
 (0)