Skip to content

Commit 5305503

Browse files
Update shadcn AutoTable search sizing to be wider and to compress as the page compresses
1 parent 0b95883 commit 5305503

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

packages/react/spec/auto/shadcn-defaults/__snapshots__/shadcnClassnameSafelist.spec.ts.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -878,10 +878,6 @@ body {
878878
width: 100%;
879879
}
880880
881-
.min-w-\\[300px\\] {
882-
min-width: 300px;
883-
}
884-
885881
.max-w-\\[150px\\] {
886882
max-width: 150px;
887883
}
@@ -890,6 +886,10 @@ body {
890886
max-width: 200px;
891887
}
892888
889+
.max-w-\\[420px\\] {
890+
max-width: 420px;
891+
}
892+
893893
.max-w-full {
894894
max-width: 100%;
895895
}

packages/react/src/auto/shadcn/GadgetShadcnTailwindSafelist.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const SpecialCaseClassNames = [
44
"max-h-[100px]",
55
"max-w-[150px]",
66
"max-w-[200px]",
7+
"max-w-[420px]",
78
"border-b-[1px]",
89
"border-t-[1px]",
910
"border-x-[1px]",

packages/react/src/auto/shadcn/table/ShadcnAutoTableSearch.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ export const makeShadcnAutoTableSearch = (elements: ShadcnElements) => {
1313
const { clear, set, value } = props.search;
1414

1515
return (
16-
<div className="flex flex-row items-center gap-2">
17-
<Input placeholder="Search" onChange={(e) => set(e.target.value)} value={value} className="min-w-[300px]"></Input>
16+
<div className="flex flex-row items-center gap-2 w-full">
17+
<Input placeholder="Search" onChange={(e) => set(e.target.value)} value={value} className="max-w-[420px]"></Input>
1818
{value.length > 0 && (
1919
<Button disabled={!value} onClick={clear} variant="ghost">
2020
Reset <X />

0 commit comments

Comments
 (0)