log-viewer icon indicating copy to clipboard operation
log-viewer copied to clipboard

No results - Buttons are not working

Open MrYamous opened this issue 1 month ago • 1 comments

Versions used :

Log-viewer 3.14.0 - PHP 8.2.25 - Laravel 11.35.1

When :

  1. I type something in the search bar with no result found
  2. Two buttons clear search query and search all files are displayed
  3. I click on those buttons, but nothing happens

Without any message or error in browser's console

MrYamous avatar Nov 24 '25 08:11 MrYamous

I found the root cause of this issue.

In BaseLogTable.vue, the clearSelectedFile function emits an event:

// BaseLogTable.vue line 165-168
const emit = defineEmits(['clearSelectedFile', 'clearQuery']);

const clearSelectedFile = () => {
  emit('clearSelectedFile');
}

However, in the parent component LogList.vue, the component is used without listening to these events:

<!-- LogList.vue line 39 -->
<base-log-table />
This means the emitted events are never handled, causing the buttons to appear non-functional. Suggested fix: In LogList.vue, add event handlers:
<base-log-table 
  @clear-selected-file="fileStore.selectFile(null)" 
  @clear-query="searchStore.setQuery('')" 
/>

Environment: Log Viewer: v3.21.1 Laravel: 12.38.1 PHP: 8.2

Minidoracat avatar Nov 28 '25 06:11 Minidoracat