[PickerInput]: deprecated entity mode in flavor datasource.getById
- Dominant language
- TypeScript
- Stars
- 247
- Forks
- 78
- Avg merge
- 14h 27m
- Merged PRs (30d)
- 15
Description
## To Do
Historically, the PickerInput component has supported the `valueType='entity'` prop, which enables PickerInput to accept the entire entity as a `value`/`onValueChange`. Previously, this was the only option to retrieve the selected entity from the picker without making an additional backend request.
However, this functionality can now be achieved using the `datasource.getById('id')` method, which returns the entity based on the provided ID.
Since the entity mode in PickerInput adds unnecessary complexity to its development and testing without offering significant user benefits, we propose deprecating it in favor of using `datasource.getById`.
## Describe the solution you'd like (optional)
- Consult with current clients to identify any specific cases where they use `valueType='entity'`, and ensure that datasource.getById can cover these scenarios.
- Deprecate the `valueType='entity'` prop by displaying a console warning when it is used. Remove the use of entity mode from the UUI codebase and documentation.
- Provide examples in the documentation on how to retrieve an entity using `datasource.getById`.
Contributor guide
Assessment
This issue has not been assessed yet.