graphql-engine/docs-old/_theme/djangodocs/search.html
Rikin Kachhia cc30f08f6e docs: move docs-new to docs
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4261
GitOrigin-RevId: 3d80068acdd61b5350fc36ec3444db47508f9c09
2022-04-13 12:01:50 +00:00

24 lines
570 B
HTML

{% extends "layout.html" %}
{% block extrafooter %}
<!-- handle search query -->
<script>
const handleQueryParams = function() {
const urlParams = new URLSearchParams(window.location.search);
const searchTerm = urlParams.get('query');
if (searchTerm) {
const searchInput = document.getElementById('search_element');
searchInput.value = searchTerm;
searchInput.dispatchEvent(new Event('input'));
}
};
if (window.location.search.length > 0) {
handleQueryParams();
}
</script>
{% endblock %}