Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding bar search in apps menu #418

Open
mos790 opened this issue Apr 22, 2023 · 3 comments
Open

Adding bar search in apps menu #418

mos790 opened this issue Apr 22, 2023 · 3 comments

Comments

@mos790
Copy link

mos790 commented Apr 22, 2023

Hello,

Thanks a lot for this solution,

Is it possible to add a bar search (similar to power BI server) allowing users to search apps ?

Thanks,

@LEDfan
Copy link
Member

LEDfan commented May 4, 2023

Hi

We don't have out of the box support for searching for apps. You could implement this yourselves by adding some javascript to the shinyproxy templates. For example, you could use the API to search for a list of applications.

See https://shinyproxy.io/documentation/api/ and https://github.com/openanalytics/shinyproxy-config-examples/tree/master/04-custom-html-template for more information.

I'll keep this issue open as a feature for request for a built-in search function.

@corey-dawson
Copy link

Has anyone done this? would love to see an example of adding a search bar to the main shinyproxy screen

@PauloJhonny
Copy link

PauloJhonny commented Jul 5, 2023

Hi,

I don't know if i can help you in some way with my code, but I added this lines to index.html in order to show a search bar:

...
...
...

<div class="row">
		<div class="pull-right col-md-3">
			<input type="text" name="searchbox" id="searchbox" class="filterinput form-control"
				placeholder="&#xF002; Buscar módulo..."
				style="font-family: FontAwesome, Arial; font-style: normal">
		</div>
</div>

...
...
...

<script type="text/javascript" th:inline="javascript">

		$(document).ready(function () {
			$("#searchbox").on("keyup", function () {
				var value = $(this).val().toLowerCase();
				$('div[data-role="modulos_cards"]').filter(function () {
					$(this).toggle($(this).find('a.card-title, a.card-subtitle').text().toLowerCase().indexOf(value) > -1)

				});
			});
		});

</script>

...
...
...

I hope it can help you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants