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
Current behavior
In the example from the documentation OrderList component, there is a "dataKey" field in the props. But the OrderList component doesn't use these props. As I see OrderList saves object reference to use it to current selections. This approach gives rise to problems if change OrderList "value".
I wrote a little example on codesandbox.io. try to change order after delete element or add or update.
Expected behavior
I think using "dataKey" instead of object reference will solve this problem. Also, I founding a good idea to add "selectedDataKey" and "onChangeSelected" callback to props. It will help easier make solutions as I show in codesandbox.io.
React version:
17
PrimeReact version:
6.4.1
The text was updated successfully, but these errors were encountered:
mertsincan
changed the title
ordering in OrderList component
Add dataKey property to OrderList and PickList components
Jul 14, 2021
[*] bug report
[ ] feature request
[ ] support request
Codesandbox Case (Bug Reports)
https://codesandbox.io/s/condescending-rain-k7t69?file=/src/demo/OrderListDemo.tsx
Current behavior
In the example from the documentation OrderList component, there is a "dataKey" field in the props. But the OrderList component doesn't use these props. As I see OrderList saves object reference to use it to current selections. This approach gives rise to problems if change OrderList "value".
I wrote a little example on codesandbox.io. try to change order after delete element or add or update.
Expected behavior
I think using "dataKey" instead of object reference will solve this problem. Also, I founding a good idea to add "selectedDataKey" and "onChangeSelected" callback to props. It will help easier make solutions as I show in codesandbox.io.
React version:
17
PrimeReact version:
6.4.1
The text was updated successfully, but these errors were encountered: