Skip to content

Commit

Permalink
D8CORE-000: Fixes broken filtering logic on view field. (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
sherakama authored May 15, 2020
1 parent ea32669 commit 7f36554
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions stanford_news.module
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ function stanford_news_field_widget_form_alter(&$element, FormStateInterface $fo
}

/**
* Implements hook_react_paragraphs_getfieldinfo_post_alter().
* Implements hook_react_paragraphs_form_field_data_alter().
*/
function stanford_news_react_paragraphs_getfieldinfo_post_alter($field_element, FieldConfigInterface $field_config, &$info) {
function stanford_news_react_paragraphs_form_field_data_alter(array &$info, array $field_element, FieldConfigInterface $field_config) {

// Only alter data for the news_views view field.
if ($field_config->getName() !== "su_news_view_field") {
Expand All @@ -198,6 +198,7 @@ function stanford_news_react_paragraphs_getfieldinfo_post_alter($field_element,
unset($info['displays']['stanford_news'][$index]);
}
}
sort($info['displays']['stanford_news']);
}

/**
Expand Down

0 comments on commit 7f36554

Please sign in to comment.