Skip to content
Snippets Groups Projects

Update ParagraphsWidget.php - Set limit for opening items in edit mode when...

1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
@@ -476,7 +476,7 @@ class ParagraphsWidget extends WidgetBase {
// If the node is being translated, the paragraphs should be all open
// when the form is not being rebuilt (E.g. when clicked on a paragraphs
// action) and when the translation is being added.
if (!$form_state->isRebuilding() && $host->getTranslationStatus($langcode) == TranslationStatusInterface::TRANSLATION_CREATED) {
if (!$form_state->isRebuilding() && $host->getTranslationStatus($langcode) == TranslationStatusInterface::TRANSLATION_CREATED && $items->count() < 25) {
$item_mode = 'edit';
}
// Add translation if missing for the target language.
Loading