epam / UUI

React-based components and accelerators library built by EPAM Systems.
https://uui.epam.com/
MIT License
179 stars 66 forks source link

[PickerInput]: deprecated entity mode in flavor datasource.getById #2570

Open AlekseyManetov opened 4 hours ago

AlekseyManetov commented 4 hours ago

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)

cpoftea commented 3 hours ago

How do you expect it to work with lazy/async trees when an item is not yet loaded? Async getById?