capitec / omni-components

Modern UI component library for mobile and web.
https://capitec.github.io/open-source/docs/omni-components/
MIT License
23 stars 8 forks source link

[Bug]: Date picker mobile rendering inefficiency. #207

Closed chromaticWaster closed 12 months ago

chromaticWaster commented 1 year ago

Components Version

0.10.0

Which package type are you using?

Unbundled

What type of bug is this?

Behaviour Error

Test Case/Reproduction

No response

Description

Issue picked up on a mobile application that uses the Omni-components date picker. The date picker has checks in place to indicate if it is being rendered on a mobile device or not.

In cases where the component is being rendered on a mobile device the dialog element along with the nested omni-calendar is being rendered regardless of whether the parent dialog element is visible or not.

This resulted in performance issues as the calendar component in the dialog is rendered off screen, a more elegant solution would be to only render the dialog or calendar when the component is in a toggled state.

Code of Conduct