Shiv-61 opened a new pull request, #14838: URL: https://github.com/apache/cloudstack/pull/14838
### Description Fixes: https://github.com/apache/cloudstack/issues/14719 In the Add Instance wizard (Compute > Instances > Add Instance), typing in the **Account** dropdown's search box does not filter the list. The full account list stays visible regardless of input, and the following TypeError appears in the browser console: `TypeError: Cannot read properties of undefined (reading 'toLowerCase') at filterOption (OwnershipSelection.vue:77:94)` ### Root cause All four `<a-select>` components in `OwnershipSelection.vue` set `optionFilterProp="label"` and define a custom `filterOption` that calls `option.label.toLowerCase()`. However, the `<a-select-option>` elements for **Account** and **Owner Type** were missing the `:label` attribute, so `option.label` is `undefined` and `.toLowerCase()` throws. The **Domain** and **Project** selects already had `:label` and worked correctly. This bug has been present since the component was introduced in commit `3fe2b46dd0` and affects `main`, `4.22`, and `4.20`. ### Fix Add the missing `:label` attribute to: - **Account** options: `:label="account.name"` - **Owner Type** options: `:label="$t('label.account')"` and `:label="$t('label.project')"` This is consistent with how Domain (`:label="domain.path || domain.name || domain.description"`) and Project (`:label="project.name"`) options were already defined. ### How to test 1. Log in to the UI as **Root Admin** 2. Go to **Compute > Instances > Add Instance** 3. In the **Ownership** section: - Open the **Owner Type** dropdown, type part of "Account" or "Project" → the list filters correctly - Open the **Domain** dropdown, type part of a domain name → the list filters correctly (unchanged) - Open the **Account** dropdown, type part of an existing account name → **the list now filters correctly** (was broken) - Switch Owner Type to **Project**, open the **Project** dropdown, type part of a project name → the list filters correctly (unchanged) 4. Open the browser console → **no TypeError** 5. Repeat steps 3–4 as a **Domain Admin** to verify non-root users are also unaffected ### Types of changes - [x] Bug fix (non-breaking change which fixes an issue) ### Screenshots N/A — this is a functional fix; the UI appearance is unchanged. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
