Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading item template #490

Merged
merged 3 commits into from
Jun 7, 2020
Merged

Loading item template #490

merged 3 commits into from
Jun 7, 2020

Conversation

cgross
Copy link
Contributor

@cgross cgross commented Jun 6, 2020

This PR builds on the work done by @jseminck in #451. This PR fixes the merge conflicts and an issue using the loading template in multiple collections. It also tweaks the demo app to remove the loading template from the initial example input and moves it to the second one with the remote collection.

@jseminck jseminck mentioned this pull request Jun 7, 2020
@mrsweaters mrsweaters merged commit 13bbef7 into zurb:master Jun 7, 2020
@donaldpcook donaldpcook mentioned this pull request Sep 18, 2020
@ilyaskarim
Copy link

ilyaskarim commented Jan 29, 2024

This is not working for me, any idea what I am doing wrong here, my values function looks like:

async function (text, cb) {
  let handler = async () => {
    try {
      let response = await editor.wsf_term.SearchTerms(null, text)
      if (response) {
        cb(response.map((c) => {
          const label = TermTypeApiLabels[termTypesReversed[c.TermType]]
          const key = `<span class="wsf-term-select" ><span class="wsf-term-select-shortcut" >${c.ShortcutKey}</span>${termTypesReversed[c.TermType]}: ${c[label]}</span>`;
          return {
            ...c,
            key,
            value: c.Id,
          }
        }))
      }
    } catch (e) {
      console.log(e);
    }
  }
  clearInterval(window.SearchTermsTimeout);
  window.SearchTermsTimeout = setTimeout(handler, 300);
}

and loading template

loadingItemTemplate: "<p>...loading<p>",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants