From 63c641b9ff34edf188804d3cf9be6cff1dcefee1 Mon Sep 17 00:00:00 2001 From: Steve Date: Thu, 28 Mar 2024 11:30:36 +0100 Subject: [PATCH] fix: deploy docs --- .github/workflows/release.yml | 2 +- demo/index.html | 22 ++++++++++++++++------ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 47c6977..e72cb99 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -185,7 +185,7 @@ jobs: - name: Deploy documentation using SCP uses: garygrossgarten/github-action-scp@release with: - local: docs/.vuepress/dist + local: docs/.vitepress/dist remote: "${{ vars.KONFER_SSH_TARGET }}/docs" host: ${{ secrets.KONFER_SSH_HOST }} username: ${{ secrets.KONFER_SSH_USER }} diff --git a/demo/index.html b/demo/index.html index 539e0f6..95d34ce 100644 --- a/demo/index.html +++ b/demo/index.html @@ -67,18 +67,19 @@ } document.addEventListener('DOMContentLoaded', fn); }; + ready(() => { const input = document.getElementById('auto-complete'); - + const headers = new Headers(); headers.append('content-type', 'application/x-www-form-urlencoded'); headers.append('method', 'GET'); - - fetch(`./files/data.json`, headers) + + fetch(`./data.json`, headers) .then(result => result.json()) .then(data => { - input.kompletr({ - input: null, // Optional + kompletr({ + input, data, options: { animation: { @@ -86,7 +87,6 @@ duration: 1000 }, theme: 'dark', - multiple: false, fieldsToDisplay: [ 'Name', 'CountryCode', @@ -96,7 +96,17 @@ propToMapAsValue: 'Name', startQueriyngFromChar: 2, filterOn: 'prefix', + // cache: 50000 }, + /*onKeyup: async function (value, done) { + console.log('cb.onKeyup ', value); + console.log('I\'m doing scrappy stuffs with the data!'); + const result = await fetch(`http://localhost:3000/api?q=${value}`, headers); + const d = await result.json(); + console.log('DATA', d) + // data = ['string', 'string', 'string']; + done(d); + },*/ onSelect: (selected) => { console.log('cb.onSelect', selected); },