Skip to content

Theme overrides are not applied with missing optional base values #1284

@nickofthyme

Description

@nickofthyme

Describe the bug
When using a theme override in certain circumstances the first values do NOT take precedence and revert to the baseTheme value.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://codesandbox.io/s/happy-violet-xcb3z?file=/src/App.tsx

Expected behaviour
In the example codesandbox above, I expect the crosshair value to be applied from theme2 but it is actually being applied from the baseTheme.

Additional context
Likely related to the mergeOptionalPartialValues option on the mergePartial utility function.

Related to https://github.com/elastic/kibana/pull/106845/files/039ca4ef1a815cc9d76c9ebbad3ce7a00be26115..ac3eb6a10fbe552743d7a9075c104a2c010ea043

Metadata

Metadata

Assignees

Labels

:stylingStyling related issuebugSomething isn't workingreleasedIssue released publicly

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions