Skip to content

[bug]: Prop validation fails for child components with required props passed from parents #6507

@alionazherdetska

Description

@alionazherdetska

Depends on: #6471

Description:

Currently, when post-menu is used as a child component (e.g., within post-language-switch), the label prop validation fail in Nextjs integration package:

Image

Current Workaround:

Implemented in #6471 - using requestAnimationFrame() to defer validation in post-menu.

Task:

  • Investigate and implement a proper solution for validation timing in nested components. This may involve:
  1. Enhancing validation utilities (checkRequiredAndType, etc.) to be aware of parent-child component lifecycle
  2. Adding an option to defer validation for nested components
  • Remove requestAnimationFrame() workaround from post-menu

Affected Components:
Potentially any component with required props that may be used as a child component.

Metadata

Metadata

Labels

Type

No type

Projects

Status

🚀 Done

Relationships

None yet

Development

No branches or pull requests

Issue actions