Issue when prop and slot have the same name

Created on 14 March 2023, almost 2 years ago
Updated 4 June 2023, over 1 year ago

Problem/Motivation

I've been testing cl_server with storybook and sdc module, attempting to develop a story for 📌 Create new SDC component for Olivero (header-search) Needs work . It seems that the content arg does not get rendered in storybook, but it does when I rename it to mycontent. I suspect this is a collision with the slot with the same name.

Steps to reproduce

* Install SDC
* Set up cl_server with storybook
* Apply patch from 📌 Create new SDC component for Olivero (header-search) Needs work
* Add the following to header-search-wide.stories.yml

title: Core/Olivero/Header Search Wide
stories:
  - name: 1. Default
    args:
      label: "Does this work"
      content: "Nope!"

The word "Nope!" does not appear in the DOM. Changing the prop name to mycontent and all other references fixes this.

Proposed resolution

¯\_(ツ)_/¯

Remaining tasks

User interface changes

API changes

Data model changes

💬 Support request
Status

Fixed

Version

2.0

Component

Code

Created by

🇦🇺Australia mstrelan

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

Comments & Activities

Production build 0.71.5 2024