Skip to content

Fix RSuite Tab rendering under strict CSP - #82

Open
KHusainovD wants to merge 2 commits into
masterfrom
CSP-Tab
Open

KHusainovD wants to merge 2 commits into
masterfrom
CSP-Tab

Conversation

@KHusainovD

Copy link
Copy Markdown
Collaborator

Fixes #81

Summary

  • Register a slot condition resolver on RsTab.pane. Designer and FormViewer use it to compare the active tab key with the saved key without compiling JavaScript.
  • Preserve the string format and support both legacy conditions and newly generated conditions with escaped keys.
  • Use the default evaluator for custom conditions the resolver does not handle. If compilation fails, hide the affected child and keep the rest of the form rendering.
  • Treat an empty slot name as children consistently during grouping and resolver lookup.
  • Update the tabs guide and add regression coverage for loading saved forms and switching tabs with slot condition compilation blocked.

Packages affected

  • @react-form-builder/core
  • @react-form-builder/designer
  • @react-form-builder/components-rsuite

Validation

  • TypeScript and ESLint checks passed.
  • Slot condition module tests passed.
  • Saved-form regression tests passed in Designer and FormViewer on React 18 and 19.
  • Documentation lint passed.

Breaking changes / migration

None. Existing saved forms continue to work without migration.

@KHusainovD
KHusainovD requested a review from ashalugin December 3, 2026 14:13
@KHusainovD KHusainovD self-assigned this Dec 3, 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

Development

Successfully merging this pull request may close these issues.

[Bug] RSuite Tab content crashes Designer and FormViewer under strict CSP

1 participant