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
Documents the `slotOptions.mergeProps` option to change the behavior of `PluginSlot` components to merge custom attributes with existing props on widgets.
The Hide operation will simply hide whatever content is desired. This is generally used for the default content.
282
282
283
-
.. code-block::
283
+
.. code-block::javascript
284
284
285
285
/*
286
286
* {String} op - Name of plugin operation
@@ -292,6 +292,25 @@ The Hide operation will simply hide whatever content is desired. This is general
292
292
widgetId:'some_undesired_plugin',
293
293
}
294
294
295
+
``PluginSlot`` options
296
+
``````````````````````
297
+
298
+
You may optionally pass the ``slotOptions`` prop to customize the behavior of a ``PluginSlot``, including changing the behavior plugin operations used by widgets within the ``PluginSlot``.
299
+
300
+
``mergeProps``
301
+
''''''''''''''
302
+
303
+
When enabled, this option will merge custom/overridden attributes with existing props passed to the widget, as opposed to passing these attributes to the widget via a ``content`` prop. This is especially useful when using a ``PluginSlot`` to support any custom attributes as well as handle special cases such as merging of custom class names with existing class names.
304
+
305
+
.. code-block:: javascript
306
+
307
+
<PluginSlot
308
+
slotOptions={{ mergeProps:true }}
309
+
>
310
+
<DefaultContents />
311
+
</PluginSlot>
312
+
313
+
295
314
Using a Child Micro-frontend (MFE) for iFrame-based Plugins and Fallback Behavior
0 commit comments