Skip to content

calcite-modal's scale overrides calcite-input's scale #6494

@omarkawach

Description

@omarkawach

Actual Behavior

When calcite-input gets loaded by the lazy loader (the first time), it disregards its own scale and searches the ancestry for a scale.

In the case of a modal set to scale="l", the calcite-input will find the modal and use it for its scale even though the calcite-input was set to scale "m".

Our subsequent calcite-input instances are working correctly in the Arcade editor

Expected Behavior

The scale of calcite-input should not be overwritten by another component when a scale is already set

<calcite-input
      value={""}
      icon="magnifying-glass"
      clearable
      scale="s"
/>

Reproduction Sample

https://github.com/Esri/calcite-components/blob/cad286dd84163d61aae15c55dac3c01808aea221/src/components/input/input.tsx#L452

Reproduction Steps

Sharing the problematic line of code. Talk to @jcfranco

Difficult to reproduce in a codepen https://codepen.io/omarkawach/pen/VwGYMmo

Reproduction Version

1.0.7

Relevant Info

No response

Regression?

No response

Impact

We had to do a workaround for now

<div scale="m"><calcite-input ... /></div>

This way calcite input finds an ancestor with a scale other than the modal's scale.

Esri team

ArcGIS Online

Metadata

Metadata

Assignees

Labels

4 - verifiedIssues that have been tested, confirmed as mitigated, and are ready to close.ArcGIS OnlineIssues logged by ArcGIS Online team members.bugBug reports for broken functionality. Issues should include a reproduction of the bug.estimate - 2Small fix or update, may require updates to tests.has workaroundIssues have a workaround available in the meantime.p - highIssue should be addressed in the current milestone, impacts component or core functionality

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions