hensei-web/components/common
Justin Edmund f6d0a0b795 Ensure content gets reset when edits are committed
Here, we do some tactical bandaid fixes to ensure that when the user saves data to the server, the editor will show the freshest data in both editable and read-only mode.

In the Editor, its as easy as calling the setContent command in a useEffect hook when the content changes.

In the party, we are saving party in a state and passing it down to the components via props. This is because the party prop we get from pages is only from the first time the server loaded data, so any edits are not reflected. The app state should have the latest updates, but due to reasons I don't completely understand, it is showing the old state first and then the one we want, causing the Editor to get stuck on old data.

By storing the party in a state, we can populate the state from the server when the component mounts, then update it whenever the user saves data since all party data is saved in that component.
2023-07-06 02:45:37 -07:00
..
Alert Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
Button Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
Command Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
ContextMenu Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
ContextMenuItem Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
Dialog Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
DialogContent Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
DialogFooter Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
DialogHeader Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
DropdownMenuContent Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
DropdownMenuGroup Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
DropdownMenuItem Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
DropdownMenuLabel Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
DurationInput Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
Editor Ensure content gets reset when edits are committed 2023-07-06 02:45:37 -07:00
Hovercard Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
Input Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
InputTableField Rich text editor and support for tagging objects (#340) 2023-07-05 21:19:34 -07:00
Overlay Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
Popover Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
PopoverContent Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
Segment Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
SegmentedControl Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
Select Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
SelectGroup Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
SelectItem Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
SelectTableField Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
SelectWithInput Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
Slider Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
SliderTableField Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
Switch Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
SwitchTableField Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
TableField Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
Textarea Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
Toast Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00
Token Rich text editor and support for tagging objects (#340) 2023-07-05 21:19:34 -07:00
ToolbarButton Add ToolbarButton component 2023-07-06 01:53:30 -07:00
Tooltip Migrate to CSS modules (#335) (#336) 2023-07-04 00:43:49 -07:00