Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/tm 1561 edit width cell table #772

Merged
merged 5 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ const VersionHistory = ({
options={polygonVersionData ?? []}
optionVariant="text-12-light"
titleClassname="one-line-text !w-full !text-nowrap"
titleContainerClassName="!w-[92%] !text-nowrap"
titleContainerClassName="!w-[calc(100%-25px)] !text-nowrap"
defaultValue={[selectPolygonVersion?.uuid ?? selectedPolygon?.uuid] as string[]}
onChange={e => {
const polygonVersionData = (data as SitePolygonsDataResponse)?.find(item => item.uuid === e[0]);
Expand Down
9 changes: 5 additions & 4 deletions src/components/elements/Table/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,17 +186,18 @@ function Table<TData extends RowData>({
}
>
<div
className="inline w-full max-w-full"
style={{
fontSize: "inherit",
fontWeight: "inherit",
color: "currentColor",
fontFamily: "inherit"
}}
>
<span
className="font-inherit relative"
<div
className="font-inherit relative w-full max-w-full"
style={{
marginRight: `${iconRefs.current[header.index]?.getBoundingClientRect().width}px`
paddingRight: `${iconRefs.current[header.index]?.getBoundingClientRect().width}px`
}}
>
<span
Expand Down Expand Up @@ -238,7 +239,7 @@ function Table<TData extends RowData>({
/>
</span>
</When>
</span>
</div>
</div>
</th>
);
Expand Down
4 changes: 2 additions & 2 deletions src/components/elements/Table/TableVariants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ export const VARIANT_TABLE_SITE_POLYGON_REVIEW = {
table: "border-collapse",
name: "border-airtable",
tableWrapper: "border border-neutral-200 rounded-lg overflow-hidden",
trHeader: "bg-neutral-150",
trHeader: "bg-neutral-150 sticky top-0 z-auto",
thHeader:
"first:pl-4 first:pr-2 last:pl-2 last:pr-4 border-y border-neutral-200 text-14-semibold whitespace-normal px-2 border-t-0",
"first:pl-4 first:pr-2 last:pl-2 last:pr-4 border-y border-neutral-200 text-14-semibold whitespace-normal px-2 border-t-0 sticky top-0 z-auto",
tBody: "",
trBody: "bg-white border-y border-neutral-200 last:border-b-0",
tdBody: "text-14-light px-2 py-3 first:pl-4 first:pr-2 last:pl-2 last:pr-4 ",
Expand Down
Loading
Loading