[PR #4315] [MERGED] fix: delete button missing after searching for a user #5648

Closed
opened 2026-10-31 20:48:23 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/4315
Author: @abdalrahmanx9
Created: 5/12/2026
Status: ✅ Merged
Merged: 5/12/2026
Merged by: @MHSanaei

Base: main ← Head: fix/delete-button-missing-on-search


📝 Commits (1)

  • cdeb144 fix: delete button missing after searching for a user

📊 Changes

2 files changed (+4 additions, -2 deletions)

View changed files

📝 frontend/src/pages/inbounds/ClientRowTable.vue (+2 -1)
📝 frontend/src/pages/inbounds/InboundList.vue (+2 -1)

📄 Description

Summary

When searching for a user, the "Delete" button disappears from search results, making it impossible to delete a user directly from search.

Root Cause

ClientRowTable.vue computes isRemovable as clients.value.length > 1. When a search is active, InboundList.vue projects the inbound via projectInbound(), creating a clone with only the matching clients. If exactly 1 client matches the search, clients.value.length becomes 1, so isRemovable evaluates to false — hiding the Delete button (and bulk-delete bar) even though the original inbound may have many clients.

Fix

  1. Added a totalClientCount prop to ClientRowTable.vue
  2. Changed isRemovable to use the original total client count (from the parent's clientCount prop), falling back to the projected count for backward compatibility
  3. Pass :total-client-count from InboundList.vue in both mobile card and desktop table templates

Closes #4313


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/4315 **Author:** [@abdalrahmanx9](https://github.com/abdalrahmanx9) **Created:** 5/12/2026 **Status:** ✅ Merged **Merged:** 5/12/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `fix/delete-button-missing-on-search` --- ### 📝 Commits (1) - [`cdeb144`](https://github.com/MHSanaei/3x-ui/commit/cdeb14468e6213a58a9e304bdab80003d2e2e99b) fix: delete button missing after searching for a user ### 📊 Changes **2 files changed** (+4 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/pages/inbounds/ClientRowTable.vue` (+2 -1) 📝 `frontend/src/pages/inbounds/InboundList.vue` (+2 -1) </details> ### 📄 Description ## Summary When searching for a user, the "Delete" button disappears from search results, making it impossible to delete a user directly from search. ## Root Cause `ClientRowTable.vue` computes `isRemovable` as `clients.value.length > 1`. When a search is active, `InboundList.vue` projects the inbound via `projectInbound()`, creating a clone with **only the matching clients**. If exactly 1 client matches the search, `clients.value.length` becomes `1`, so `isRemovable` evaluates to `false` — hiding the Delete button (and bulk-delete bar) even though the original inbound may have many clients. ## Fix 1. Added a `totalClientCount` prop to `ClientRowTable.vue` 2. Changed `isRemovable` to use the original total client count (from the parent's `clientCount` prop), falling back to the projected count for backward compatibility 3. Pass `:total-client-count` from `InboundList.vue` in both mobile card and desktop table templates Closes #4313 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 20:48:23 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#5648
No description provided.