Commit cdaa92c8 authored by Harumi Jang's avatar Harumi Jang 🤠 Committed by Tim Plunkett
Browse files

Issue #3284327 by hooroomoo, bnjmnm, narendraR: When sort status changes, convey the change to AT

parent 111487a2
Loading
Loading
Loading
Loading
+0 −0

File changed.

Preview suppressed by a .gitattributes entry or the file's encoding is unsupported.

+0 −0

File changed.

Preview suppressed by a .gitattributes entry or the file's encoding is unsupported.

+8 −5
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@
    specialIds,
    moduleCategoryFilter,
    moduleCategoryVocabularies,
    sort,
  } from './stores';
  import {
    SORT_OPTIONS,
@@ -35,8 +36,6 @@
  export let index = -1;
  export let text = '';
  export let direction = 'DESC';
  export let sort;

  export let labels = {
    placeholder: Drupal.t('Module Name, Keyword(s), etc.'),
  };
@@ -56,6 +55,7 @@
  const apiSecurityCoverage = fetchAllEndpoint('security_coverage');
  let isOpen = false;
  const sortOptions = SORT_OPTIONS;
  let sortText = sortOptions.find((option) => option.id === $sort).text;

  onMount(async () => {
    apiDevelopmentStatus.then((value) => {
@@ -113,12 +113,13 @@
      pageIndex: state.pageIndex,
      pageSize: state.pageSize,
      rows: state.filteredRows,
      sort,
      sort: $sort,
      direction,
    };
    dispatch('sort', detail);
    stateContext.setPage(0, 0);
    stateContext.setRows(detail.rows);
    sortText = sortOptions.find((option) => option.id === $sort).text;
  }

  async function onAdvancedFilter(event) {
@@ -192,7 +193,6 @@
      />
    </div>
  </div>

  <div
    class="grid-container views-exposed-form__item js-form-item js-form-type-select form-type--select js-form-item-type form-item--type"
  >
@@ -200,6 +200,9 @@
      <output>
        {$rowsCount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')}
        {Drupal.t('Results')}
        <span class="visually-hidden"
          >{Drupal.t('Sorted by @sortText', { '@sortText': sortText })}</span
        >
      </output>
      {#await apiDevelopmentStatus then data}
        {#each $filters.developmentStatus as status}
@@ -285,7 +288,7 @@
      <select
        name="pb-sort"
        id="pb-sort"
        bind:value={sort}
        bind:value={$sort}
        on:change={onSort}
        class="form-select form-element form-element--type-select"
      >