Conditionally required props

Created on 11 December 2024, about 1 month ago

Problem/Motivation

conditional(ly required) props (f.e.: if the {type: boolean} cta.enabled prop is true, also require the cta.text and cta.url props)

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Feature request
Status

Active

Version

11.0 🔥

Component

single-directory components

Created by

🇦🇺Australia griffynh Sydney

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @griffynh
  • 🇫🇷France pdureau Paris

    This looks like a need driven by a display builder UX, not by UI component modelling. So such feature doesn't seem to belong to SDC.

    if the {type: boolean} cta.enabled prop is true, also require the cta.text and cta.url props)

    Maybe the component is ill defined. Maybe the cta.enabled is not necessary because the same as the cta.text and cta.url expression.

Production build 0.71.5 2024