[WEB-1820]: Fix/project selection dropdown (#5122)
* fix: Truncated project name under custom analytics's project selection dropdown * fix: project name truncated * fix: removed static width * fix: hardcoded width * fix: css * fix: handled the custom search button * Freeze hookform version * Revert yarn lock --------- Co-authored-by: Satish Gandham <satish.iitg@gmail.com>
This commit is contained in:
parent
4c353b6eeb
commit
33d6a8d233
4 changed files with 1094 additions and 1219 deletions
|
|
@ -115,7 +115,7 @@ export const CustomSearchSelect = (props: ICustomSearchSelectProps) => {
|
||||||
onClick={toggleDropdown}
|
onClick={toggleDropdown}
|
||||||
>
|
>
|
||||||
{label}
|
{label}
|
||||||
{!noChevron && !disabled && <ChevronDown className="h-3 w-3" aria-hidden="true" />}
|
{!noChevron && !disabled && <ChevronDown className="h-3 w-3 flex-shrink-0" aria-hidden="true" />}
|
||||||
</button>
|
</button>
|
||||||
</Combobox.Button>
|
</Combobox.Button>
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
|
|
@ -37,14 +37,16 @@ export const SelectProject: React.FC<Props> = observer((props) => {
|
||||||
onChange={(val: string[]) => onChange(val)}
|
onChange={(val: string[]) => onChange(val)}
|
||||||
options={options}
|
options={options}
|
||||||
label={
|
label={
|
||||||
value && value.length > 0
|
<div className="truncate">
|
||||||
? projectIds
|
{value && value.length > 0
|
||||||
?.filter((p) => value.includes(p))
|
? projectIds
|
||||||
.map((p) => getProjectById(p)?.name)
|
?.filter((p) => value.includes(p))
|
||||||
.join(", ")
|
.map((p) => getProjectById(p)?.name)
|
||||||
: "All projects"
|
.join(", ")
|
||||||
|
: "All projects"}
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
optionsClassName={"w-48"}
|
optionsClassName="w-48"
|
||||||
multiple
|
multiple
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@
|
||||||
"react-day-picker": "^8.10.0",
|
"react-day-picker": "^8.10.0",
|
||||||
"react-dom": "^18.3.1",
|
"react-dom": "^18.3.1",
|
||||||
"react-dropzone": "^14.2.3",
|
"react-dropzone": "^14.2.3",
|
||||||
"react-hook-form": "^7.38.0",
|
"react-hook-form": "7.51.5",
|
||||||
"react-markdown": "^8.0.7",
|
"react-markdown": "^8.0.7",
|
||||||
"react-popper": "^2.3.0",
|
"react-popper": "^2.3.0",
|
||||||
"sharp": "^0.32.1",
|
"sharp": "^0.32.1",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue