Files
twenty/packages
Ajay A Adsule 16bccc19e8 fix: move icon state update to useEffect in ObjectOptionsDropdownMenu… (#12611)
Fixed a React state update issue in the
ObjectOptionsDropdownMenuViewName component where the icon state was
being updated during render, causing a React warning.

### What was the issue?
- The code was updating the view's icon state
(`setViewPickerSelectedIcon`) on component mount
- This triggered React's warning: "Cannot update a component while
rendering a different component"

### How was it fixed?
- Moved the state update into a `useEffect` hook
- The icon state now updates properly after component render
- Added proper dependencies to the `useEffect` hook (`currentView.icon`
and `setViewPickerSelectedIcon`)



https://github.com/user-attachments/assets/b3b6b3ba-16cd-4d9a-83db-eea96dc51bd6


fix #11852
2025-06-16 15:13:53 +02:00
..
2025-06-06 18:35:30 +02:00
2025-06-06 18:35:30 +02:00
2025-06-13 09:23:41 +00:00
2025-06-06 18:35:30 +02:00