-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Infinite Scroll for GraphQL Backend Service
- add new Example 27 for GraphQL with Infinite Scroll demo
- Loading branch information
1 parent
919fe25
commit a057864
Showing
16 changed files
with
727 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
examples/vite-demo-vanilla-bundle/src/examples/example27.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<div class="demo26"> | ||
<h3 class="title is-3"> | ||
Example 27 - GraphQL Backend Service with Infinite Scroll | ||
<div class="subtitle code-link"> | ||
<span class="is-size-6">see</span> | ||
<a class="is-size-5" target="_blank" | ||
href="https://github.com/ghiscoding/slickgrid-universal/blob/master/examples/vite-demo-vanilla-bundle/src/examples/example27.ts"> | ||
<span class="mdi mdi-link-variant"></span> code | ||
</a> | ||
</div> | ||
</h3> | ||
|
||
<h6 class="title is-6 italic"> | ||
<span class="text-red">(*) NO DATA SHOWN</span> | ||
- just change any of Filters/Sorting/Pages and look at the "GraphQL Query" changing. | ||
Also note that the column Name has a filter with a custom %% operator that behaves like an SQL LIKE operator supporting % wildcards. | ||
Depending on your configuration, your GraphQL Server might already support regex querying (e.g. Hasura <a href="https://hasura.io/docs/latest/queries/postgres/filters/text-search-operators/#_regex">_regex</a>) | ||
or you could add your own implementation (e.g. see this <a href="https://stackoverflow.com/a/37981802/1212166">SO</a>). | ||
</h6> | ||
|
||
<div class="row"> | ||
<button class="button is-small" data-test="clear-filters-sorting" | ||
onclick.delegate="clearAllFiltersAndSorts()" title="Clear all Filters & Sorts"> | ||
<span class="mdi mdi-close"></span> | ||
<span>Clear all Filter & Sorts</span> | ||
</button> | ||
|
||
<label for="serverdelay" class="ml-4">Server Delay: </label> | ||
<input id="serverdelay" type="number" data-test="server-delay" class="is-narrow input is-small" | ||
value.bind="serverWaitDelay" | ||
title="input a fake timer delay to simulate slow server response" /> | ||
|
||
<div class="row col-md-12 mt-2"> | ||
<button class="button is-small" onclick.delegate="switchLanguage()" data-test="language-button"> | ||
<span class="mdi mdi-translate"></span> | ||
<span>Switch Language</span> | ||
</button> | ||
<b>Locale:</b> | ||
<span class="text-italic" data-test="selected-locale" textcontent.bind="selectedLanguageFile"> | ||
</span> | ||
|
||
<span class="ml-4"> | ||
<b>Metrics:</b> | ||
<span textcontent.bind="metricsEndTime"></span> — | ||
<span textcontent.bind="metricsItemCount" data-test="itemCount"></span> of | ||
<span textcontent.bind="metricsTotalItemCount" data-test="totalItemCount"></span> items | ||
<span classname.bind="tagDataClass" data-test="data-loaded-tag">All Data Loaded!!!</span> | ||
</span> | ||
</div> | ||
|
||
</div> | ||
|
||
<div class="columns mt-2"> | ||
<div class="column"> | ||
<div class="notification is-info is-light" data-test="alert-graphql-query"> | ||
<strong>GraphQL Query:</strong> | ||
<span data-test="graphql-query-result" textcontent.bind="graphqlQuery"></span> | ||
</div> | ||
</div> | ||
<div class="column is-narrow"> | ||
<div class.bind="statusClass" data-test="status"> | ||
<strong>Status:</strong> <span textcontent.bind="status"></span> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="grid27"> | ||
</div> | ||
</div> |
8 changes: 8 additions & 0 deletions
8
examples/vite-demo-vanilla-bundle/src/examples/example27.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.demo27 { | ||
.tag-data { | ||
display: none; | ||
&.fully-loaded { | ||
display: inline-flex; | ||
} | ||
} | ||
} |
Oops, something went wrong.