Bug: 'Add a Registrant' dropdown is empty for invite-only events and crashes on text input
bugjavascript
## Description
When an event creator opens the **"Add a Registrant"** dialog for an **invite-only** event, the user-search dropdown is empty (no users listed). Typing any text into the search field (e.g., "harve") causes a JavaScript crash:
```
Cannot read properties of null (reading 'removeAttribute')
```
This affects both **Admin Portal** and **User Portal**, and reproduces for both admin and regular user logins.
## Steps to Reproduce
1. Create an event with **Invite Only** visibility
2. Open the event (Admin Portal or User Portal)
3. Click **"Add a Registrant"**
4. Observe: the user-search dropdown is **empty** — no users are listed
5. Type any characters in the search field (e.g., `harve`)
6. Observe crash: `Cannot read properties of null (reading 'removeAttribute')`
## Expected Behavior
- The dropdown should list searchable users that can be added as registrants
- Typing in the search field should filter users without crashing
- The event creator (and admins) should be able to register attendees for invite-only events
## Actual Behavior
- Dropdown shows no users at all
- Typing triggers a null-dereference crash: `Cannot read properties of null (reading 'removeAttribute')`
## Impact
- **Severity:** High (complete loss of registrant-management functionality for invite-only events)
- **Affected flows:** Admin Portal event management, User Portal event registration management
- **Affected roles:** Both admin and regular user logins
## Notes
- This bug is **pre-existing** and was **not introduced** by PR `#7440`
- Discovered during manual testing of invite-only event flows while working on PR `#7440`
- Reference: https://github.com/PalisadoesFoundation/talawa-admin/pull/7440
## Files Likely Involved
- Component(s) rendering the "Add a Registrant" modal/dropdown
- User-search query / GraphQL query used to populate the registrant dropdown
- The null-dereference in `removeAttribute` suggests a DOM node is being accessed after unmount or before mount — likely in the autocomplete/combobox input handler
4 条评论