fix: use loose equality for company ID comparison in mapping dropdowns
The dropdown wasn't showing mapped company names due to type mismatch between string and number IDs. Changed === to == for comparison.
This commit is contained in:
parent
ca61b7785d
commit
f1985e2ea5
2 changed files with 3 additions and 3 deletions
|
|
@ -416,7 +416,7 @@ function TenantMappingRow({
|
|||
<SelectValue placeholder="Select a company...">
|
||||
{selectedCompanyId === 0
|
||||
? "No mapping"
|
||||
: companies.find(c => c.id === selectedCompanyId)?.companyName || "Select a company..."}
|
||||
: companies.find(c => c.id == selectedCompanyId)?.companyName || "Select a company..."}
|
||||
</SelectValue>
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
|
|
|
|||
|
|
@ -459,9 +459,9 @@ function SiteMappingRow({
|
|||
>
|
||||
<SelectTrigger className="w-full">
|
||||
<SelectValue placeholder="Select a company...">
|
||||
{selectedCompanyId === 0
|
||||
{selectedCompanyId == 0
|
||||
? "No mapping"
|
||||
: companies.find(c => c.id === selectedCompanyId)?.companyName || "Select a company..."}
|
||||
: companies.find(c => c.id == selectedCompanyId)?.companyName || "Select a company..."}
|
||||
</SelectValue>
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue