-
-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6530 from getkirby/fix/search-js-abort
Panel search improvements
- Loading branch information
Showing
11 changed files
with
403 additions
and
230 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?php | ||
|
||
return [ | ||
'docs' => 'k-search-bar', | ||
]; |
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,60 @@ | ||
<template> | ||
<k-lab-examples> | ||
<k-lab-example label="Default"> | ||
<k-search-bar /> | ||
</k-lab-example> | ||
<k-lab-example label="Types"> | ||
<k-search-bar :types="types" /> | ||
</k-lab-example> | ||
<k-lab-example label="Default type"> | ||
<k-search-bar :types="types" default-type="files" /> | ||
</k-lab-example> | ||
<k-lab-example label="No results"> | ||
<k-search-bar :results="[]" /> | ||
</k-lab-example> | ||
<k-lab-example label="Results"> | ||
<k-search-bar :results="results" /> | ||
</k-lab-example> | ||
<k-lab-example label="More results"> | ||
<k-search-bar :results="results" :pagination="{ total: 20 }" /> | ||
</k-lab-example> | ||
<k-lab-example label="Is Loading"> | ||
<k-search-bar :is-loading="true" :results="results" :types="types" /> | ||
</k-lab-example> | ||
</k-lab-examples> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
computed: { | ||
results() { | ||
return [ | ||
{ text: "Result A" }, | ||
{ text: "Result B" }, | ||
{ text: "Result C" }, | ||
{ text: "Result D" } | ||
]; | ||
}, | ||
types() { | ||
return { | ||
pages: { | ||
id: "pages", | ||
icon: "page", | ||
label: "Pages" | ||
}, | ||
files: { | ||
id: "files", | ||
icon: "file", | ||
label: "Files" | ||
} | ||
}; | ||
} | ||
} | ||
}; | ||
</script> | ||
|
||
<style> | ||
.k-lab-example .k-search-bar { | ||
background: var(--color-gray-100); | ||
} | ||
</style> |
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
Oops, something went wrong.