Content-Length: 292027 | pFad | http://github.com/lowcoder-org/lowcoder/pull/1675/commits/9eb9341bb03e1aa6e5cb69613071e283df0b2890

37 [Fix]: #1626 Width Column Layout by iamfaran · Pull Request #1675 · lowcoder-org/lowcoder · GitHub
Skip to content

[Fix]: #1626 Width Column Layout #1675

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

Merged
merged 11 commits into from
May 14, 2025
Prev Previous commit
[FIX] #1503 min-width for ResponsiveLayout Component
  • Loading branch information
iamfaran committed May 13, 2025
commit 9eb9341bb03e1aa6e5cb69613071e283df0b2890
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const ColWrapper = styled(Col)<{
flex-basis: ${(props) =>
props.$rowBreak
? `calc(100% / var(--columns))` // Force exact column distribution
: `clamp(${props.$minWidth}, 100% / var(--columns), 100%)`}; // MinWidth respected
: `clamp(${props.$minWidth || "0px"}, calc(100% / var(--columns)), 100%)`}; // MinWidth respected

min-width: ${(props) => props.$minWidth}; // Ensure minWidth is respected
max-width: 100%; // Prevent more columns than allowed
Expand Down Expand Up @@ -237,7 +237,8 @@ const ResponsiveLayout = (props: ResponsiveLayoutProps) => {
if (!containers[id]) return null;
const containerProps = containers[id].children;

const calculatedWidth = 100 / numberOfColumns;
// Use the actual minWidth from column configuration instead of calculated width
const columnMinWidth = column.minWidth || `${100 / numberOfColumns}px`;

return (
<ColWrapper
Expand All @@ -247,7 +248,7 @@ const ResponsiveLayout = (props: ResponsiveLayoutProps) => {
sm={rowBreak ? 24 / numberOfColumns : undefined}
xs={rowBreak ? 24 / numberOfColumns : undefined}
$style={props.columnStyle}
$minWidth={`${calculatedWidth}px`}
$minWidth={columnMinWidth}
$matchColumnsHeight={matchColumnsHeight}
$rowBreak={rowBreak}
>
Expand Down
Loading








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/lowcoder-org/lowcoder/pull/1675/commits/9eb9341bb03e1aa6e5cb69613071e283df0b2890

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy