Content-Length: 481479 | pFad | https://github.com/sebadob/rauthy/commit/033db25db695d2565bc4adcdfe07a77125c2a9a5

78 Merge pull request #430 from sebadob/408-fix-search-reset-on-save · sebadob/rauthy@033db25 · GitHub
Skip to content

Commit

Permalink
Merge pull request #430 from sebadob/408-fix-search-reset-on-save
Browse files Browse the repository at this point in the history
fix: reset the search input on any site if data is being refetched
  • Loading branch information
sebadob authored May 10, 2024
2 parents 5008438 + 8c5397b commit 033db25
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 3 deletions.
3 changes: 3 additions & 0 deletions frontend/src/components/admin/clients/Clients.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
let clients = [];
let resClients = [];
let resClientsPaginated = [];
let search = '';
let searchOptions = [
{
Expand Down Expand Up @@ -55,6 +56,7 @@
function onSave() {
fetchClients();
fetchScopes();
search = '';
}
</script>

Expand All @@ -66,6 +68,7 @@
bind:resItems={resClients}
searchOptions={searchOptions}
orderOptions={orderOptions}
bind:search
/>

<ClientTileAddNew onSave={onSave}/>
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/components/admin/roles/Roles.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
let roles = [];
let resRoles = [];
let resRolesPaginated = [];
let search = '';
let searchOptions = [
{
Expand Down Expand Up @@ -48,6 +49,7 @@
function onSave() {
fetchData();
search = '';
}
</script>
Expand All @@ -60,6 +62,7 @@
bind:resItems={resRoles}
searchOptions={searchOptions}
orderOptions={orderOptions}
bind:search
/>

<RoleTileAddNew onSave={onSave}/>
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/components/admin/scopes/Scopes.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
let resScopes = [];
let resScopesPaginated = [];
let refresh;
let search = '';
let searchOptions = [
{
Expand All @@ -37,6 +38,7 @@
onMount(() => {
fetchScopes();
fetchAttr();
search = '';
});
async function fetchAttr() {
Expand Down Expand Up @@ -73,6 +75,7 @@
bind:resItems={resScopes}
searchOptions={searchOptions}
orderOptions={orderOptions}
bind:search
/>

<ScopeTileAddNew onSave={onSave}/>
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/components/admin/userAttr/Attr.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
let attr = [];
let resAttr = [];
let resAttrPaginated = [];
let search = '';
let searchOptions = [
{
Expand Down Expand Up @@ -40,6 +41,7 @@
function onSave() {
fetchAttr();
search = '';
}
</script>
Expand All @@ -52,6 +54,7 @@
bind:resItems={resAttr}
searchOptions={searchOptions}
orderOptions={orderOptions}
bind:search
/>

<UserAttrTileAddNew onSave={onSave}/>
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/components/admin/users/Users.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
let resUsersPaginated = [];
let useServerSideIdx = '';
let isSearchFiltered = false;
let search = '';
let usersCountTotal = 0;
let sspPageSize = 15;
Expand Down Expand Up @@ -135,6 +136,7 @@
fetchUsers();
fetchRoles();
fetchGroups();
search = '';
}
</script>

Expand All @@ -148,6 +150,7 @@
bind:orderOptions
bind:useServerSideIdx
bind:isSearchFiltered
bind:search
/>

<UserTileAddNew onSave={onSave}/>
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/lib/search/OrderSearchBar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
export let firstDirReverse = false;
export let useServerSideIdx = '';
export let isSearchFiltered = false;
export let search = '';
let searchItems = [];
</script>
Expand All @@ -34,6 +35,7 @@
options={searchOptions}
bind:useServerSideIdx
bind:isSearchFiltered
bind:search
/>
</div>
</div>
Expand Down
4 changes: 1 addition & 3 deletions frontend/src/lib/search/SearchBar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import IconMagnify from "$lib/icons/IconMagnify.svelte";
import {onMount} from "svelte";
import Tooltip from "../Tooltip.svelte";
import {getKey} from "../utils/helpers.js";
import IconBackspace from "$lib/icons/IconBackspace.svelte";
import {getSearch} from "../../utils/dataFetchingAdmin.js";
import {SERVER_SIDE_SEARCH_THRES} from "../../utils/constants.js";
Expand All @@ -13,8 +12,8 @@
export let useServerSideIdx = '';
export let isSearchFiltered = false;
export let search = '';
let selected = '';
let search = '';
let callback;
onMount(() => {
Expand Down Expand Up @@ -104,7 +103,6 @@
<input
class="input"
type="text"
name={getKey()}
bind:value={search}
placeholder="Search"
autocomplete="off"
Expand Down

0 comments on commit 033db25

Please sign in to comment.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/sebadob/rauthy/commit/033db25db695d2565bc4adcdfe07a77125c2a9a5

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy