@capillarytech/creatives-library 8.0.292-alpha.17 → 8.0.292-alpha.18

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "8.0.292-alpha.17",
4
+ "version": "8.0.292-alpha.18",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -629,10 +629,9 @@ export const InApp = (props) => {
629
629
  // tag Code end
630
630
 
631
631
  const onTemplateLayoutTypeChange = ({ target: { value } }) => {
632
- // Update layout type and force HTMLEditor to remount with latest content
633
- // Increment version to force remount - this ensures editor displays current content
632
+ // Update layout type only. Do NOT remount HTMLEditor so user edits persist.
633
+ // The editor receives layoutType prop and preview updates without losing content.
634
634
  setTemplateLayoutType(value);
635
- setHtmlEditorContentVersion((prev) => prev + 1);
636
635
  };
637
636
 
638
637
 
@@ -1356,8 +1355,8 @@ export const InApp = (props) => {
1356
1355
  variant={HTML_EDITOR_VARIANTS.INAPP}
1357
1356
  layoutType={templateLayoutType}
1358
1357
  initialContent={{
1359
- android: htmlContentAndroidRef.current || htmlContentAndroid || templateMessageAndroid || '',
1360
- ios: htmlContentIosRef.current || htmlContentIos || templateMessageIos || '',
1358
+ android: htmlContentAndroid ?? htmlContentAndroidRef.current ?? templateMessageAndroid ?? '',
1359
+ ios: htmlContentIos ?? htmlContentIosRef.current ?? templateMessageIos ?? '',
1361
1360
  }}
1362
1361
  onContentChange={handleHtmlContentChange}
1363
1362
  onSave={handleHtmlSave}