You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Not all users have avatar saved. As a default, we display avatar created from the initials.
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
The text was updated successfully, but these errors were encountered:
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
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
Description
Background
IPickerListItem
interface which containsavatarSrc
as a prop. But this prop can be only a link to stored image, in other cases 404 not found image placeholder is displayed.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 ordefault
value inavatarSrc
prop in order to achieve similar result.Design
No response
The text was updated successfully, but these errors were encountered: