diff --git a/netbox/project-static/dist/netbox.js b/netbox/project-static/dist/netbox.js index 7b305f531..ad52ff9ac 100644 Binary files a/netbox/project-static/dist/netbox.js and b/netbox/project-static/dist/netbox.js differ diff --git a/netbox/project-static/dist/netbox.js.map b/netbox/project-static/dist/netbox.js.map index ef3c1cce5..0061aa724 100644 Binary files a/netbox/project-static/dist/netbox.js.map and b/netbox/project-static/dist/netbox.js.map differ diff --git a/netbox/project-static/src/select/api.ts b/netbox/project-static/src/select/api.ts index 0a3870780..e3bdeda78 100644 --- a/netbox/project-static/src/select/api.ts +++ b/netbox/project-static/src/select/api.ts @@ -314,7 +314,7 @@ class APISelect { const options = [PLACEHOLDER] as Option[]; for (const result of results) { - const text = this.getDisplayName(result); + const text = result.display; const data = {} as Record; const value = result.id.toString(); let style, selected, disabled; @@ -514,29 +514,6 @@ class APISelect { return placeholder; } - /** - * Find this element's display name. - */ - private getDisplayName(result: APIObjectBase): string { - let displayName = result.display; - - const legacyDisplayProperty = this.base.getAttribute('display-field'); - - if ( - typeof displayName === 'undefined' && - legacyDisplayProperty !== null && - legacyDisplayProperty in result - ) { - displayName = result[legacyDisplayProperty] as string; - } - - if (!displayName && typeof result.name === 'string') { - displayName = result.name; - } - - return displayName; - } - /** * Get this element's disabled options by value. The `data-query-param-exclude` attribute will * contain a stringified JSON array of option values.