@yogiswara/honcho-editor-ui 1.4.23 → 1.4.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -91,17 +91,6 @@ export function useHonchoEditor(controller, initImageId, firebaseUid) {
|
|
|
91
91
|
const initialHeight = useRef(0);
|
|
92
92
|
const panelRef = useRef(null);
|
|
93
93
|
const contentRef = useRef(null);
|
|
94
|
-
// Effect for measuring mobile panel content
|
|
95
|
-
// useEffect(() => {
|
|
96
|
-
// const timeoutId = setTimeout(() => {
|
|
97
|
-
// if (contentRef.current) {
|
|
98
|
-
// const height = contentRef.current.scrollHeight;
|
|
99
|
-
// setContentHeight(height);
|
|
100
|
-
// }
|
|
101
|
-
// }, 50);
|
|
102
|
-
// return () => clearTimeout(timeoutId);
|
|
103
|
-
// }, [activeSubPanel ]);
|
|
104
|
-
// isBulkEditing
|
|
105
94
|
// Effect for keyboard shortcuts
|
|
106
95
|
// MARK: - Core Editor Logic
|
|
107
96
|
// MARK: Batch Edit logic
|
|
@@ -602,6 +591,15 @@ export function useHonchoEditor(controller, initImageId, firebaseUid) {
|
|
|
602
591
|
const handleCloseCopyDialog = () => setCopyDialogOpen(false);
|
|
603
592
|
const handleConfirmCopy = () => { handleCopyEdit(); handleCloseCopyDialog(); setShowCopyAlert(true); };
|
|
604
593
|
// MARK: useEffect HERE!
|
|
594
|
+
useEffect(() => {
|
|
595
|
+
const timeoutId = setTimeout(() => {
|
|
596
|
+
if (contentRef.current) {
|
|
597
|
+
const height = contentRef.current.scrollHeight;
|
|
598
|
+
setContentHeight(height);
|
|
599
|
+
}
|
|
600
|
+
}, 50);
|
|
601
|
+
return () => clearTimeout(timeoutId);
|
|
602
|
+
}, [activePanel, activeSubPanel]);
|
|
605
603
|
useEffect(() => {
|
|
606
604
|
if (showCopyAlert) {
|
|
607
605
|
const timer = setTimeout(() => setShowCopyAlert(false), 2000);
|