There's a web part on a list view page with button element on it. When user clicks the button all selected list items get deselected. I cannot change button element to input because it's Office UI Fabric component. I added type='button' attribute to the button so it won't reload the page, but it didn't help with selection. Any ideas?
Here's code I place to AllItems.aspx page. On button click all selected items get deselected:
<button type='button' onclick='test();return false;' >test</button>
<script>
function test() {
//nothing here
}
</script>