Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IPickerListItem interface] - allow to display default avatar image #1349

Open
robertp-lc opened this issue Sep 16, 2024 · 0 comments
Open
Labels
feature New feature or request

Comments

@robertp-lc
Copy link
Contributor

robertp-lc commented Sep 16, 2024

Description

Background

  1. Currently, Picker component handles IPickerListItem interface which contains avatarSrc as a prop. But this prop can be only a link to stored image, in other cases 404 not found image placeholder is displayed.
  2. Not all users have avatar saved. As a default, we display avatar created from the initials.
  3. Outcome: in order to display a list with every user having an avatar, you need to use customElement prop which can cause performance issues when working with TypeScript or with react-hook-form library (e.g. RangeError: Maximum call stack size exceeded error thrown when selecting item on the list).

Solution

Create separate property for IPickerListItem interface that would accept user's name and based on that it would create the default avatar image. Or allow to pass name or default value in avatarSrc prop in order to achieve similar result.

Design

No response

@robertp-lc robertp-lc added the feature New feature or request label Sep 16, 2024
@robertp-lc robertp-lc changed the title IPickerListItem interface - allow to pass name in order to display default avatar image [IPickerListItem interface] - allow to pass name in order to display default avatar image Sep 30, 2024
@robertp-lc robertp-lc changed the title [IPickerListItem interface] - allow to pass name in order to display default avatar image [IPickerListItem interface] - allow to display default avatar image Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

1 participant