Skip to content

Commit 61b12ba

Browse files
fix(data-table): remove inline edit short table styles (#8212)
* fix(data-table): remove inline edit short table styles * docs(DataTable): add test column for inline select * fix(data-table): add form input bgc overrides Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent 8cf3be1 commit 61b12ba

File tree

3 files changed

+55
-14
lines changed

3 files changed

+55
-14
lines changed

packages/components/src/components/data-table/_data-table-core.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,19 @@
141141
}
142142
}
143143

144+
// Form Control Overrides
145+
.#{$prefix}--list-box input[role='combobox'],
146+
.#{$prefix}--list-box input[type='text'],
147+
.#{$prefix}--dropdown,
148+
.#{$prefix}--list-box,
149+
.#{$prefix}--number input[type='number'],
150+
.#{$prefix}--number__control-btn::before,
151+
.#{$prefix}--number__control-btn::after,
152+
.#{$prefix}--text-input,
153+
.#{$prefix}--select-input {
154+
background-color: $field-02;
155+
}
156+
144157
// Overflow Menu Overrides
145158
.#{$prefix}--data-table
146159
td.#{$prefix}--table-column-menu

packages/components/src/components/data-table/_data-table-inline-edit.scss

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,4 @@
6262
padding-left: $spacing-04;
6363
}
6464
}
65-
66-
.#{$prefix}--data-table--short {
67-
input {
68-
height: rem(32px);
69-
}
70-
71-
select {
72-
padding: 0.45rem 2.75rem 0.45rem $spacing-05;
73-
}
74-
75-
.#{$prefix}--select__arrow {
76-
top: 0.875rem;
77-
}
78-
}
7965
}

packages/react/src/components/DataTable/stories/shared.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
import React from 'react';
88
import { action } from '@storybook/addon-actions';
99
import Link from '../../Link';
10+
import Select from '../../Select';
11+
import SelectItem from '../../SelectItem';
1012

1113
export const rows = [
1214
{
@@ -17,6 +19,12 @@ export const rows = [
1719
rule: 'Round robin',
1820
attached_groups: 'Kevin’s VM Groups',
1921
status: <Link>Disabled</Link>,
22+
foo: (
23+
<Select id="bar" noLabel size="sm">
24+
<SelectItem value={1} text="1" />
25+
<SelectItem value={2} text="2" />
26+
</Select>
27+
),
2028
},
2129
{
2230
id: 'b',
@@ -26,6 +34,12 @@ export const rows = [
2634
rule: 'Round robin',
2735
attached_groups: 'Maureen’s VM Groups',
2836
status: <Link>Starting</Link>,
37+
foo: (
38+
<Select id="bar" noLabel size="sm">
39+
<SelectItem value={1} text="1" />
40+
<SelectItem value={2} text="2" />
41+
</Select>
42+
),
2943
},
3044
{
3145
id: 'c',
@@ -35,6 +49,12 @@ export const rows = [
3549
rule: 'DNS delegation',
3650
attached_groups: 'Andrew’s VM Groups',
3751
status: <Link>Active</Link>,
52+
foo: (
53+
<Select id="bar" noLabel size="sm">
54+
<SelectItem value={1} text="1" />
55+
<SelectItem value={2} text="2" />
56+
</Select>
57+
),
3858
},
3959
{
4060
id: 'd',
@@ -44,6 +64,12 @@ export const rows = [
4464
rule: 'Round robin',
4565
attached_groups: 'Marc’s VM Groups',
4666
status: <Link>Disabled</Link>,
67+
foo: (
68+
<Select id="bar" noLabel size="sm">
69+
<SelectItem value={1} text="1" />
70+
<SelectItem value={2} text="2" />
71+
</Select>
72+
),
4773
},
4874
{
4975
id: 'e',
@@ -53,6 +79,12 @@ export const rows = [
5379
rule: 'Round robin',
5480
attached_groups: 'Mel’s VM Groups',
5581
status: <Link>Starting</Link>,
82+
foo: (
83+
<Select id="bar" noLabel size="sm">
84+
<SelectItem value={1} text="1" />
85+
<SelectItem value={2} text="2" />
86+
</Select>
87+
),
5688
},
5789
{
5890
id: 'f',
@@ -62,6 +94,12 @@ export const rows = [
6294
rule: 'DNS delegation',
6395
attached_groups: 'Ronja’s VM Groups',
6496
status: <Link>Active</Link>,
97+
foo: (
98+
<Select id="bar" noLabel size="sm">
99+
<SelectItem value={1} text="1" />
100+
<SelectItem value={2} text="2" />
101+
</Select>
102+
),
65103
},
66104
];
67105

@@ -90,6 +128,10 @@ export const headers = [
90128
key: 'status',
91129
header: 'Status',
92130
},
131+
{
132+
key: 'foo',
133+
header: 'foo',
134+
},
93135
];
94136

95137
export const batchActionClick = (selectedRows) => () =>

0 commit comments

Comments
 (0)