Skip to content

Commit 334b4fb

Browse files
emyarodtay1orjones
authored andcommitted
fix(data-table): add table scope to form control overrides (#8295)
* fix(data-table): add table scope to form control overrides * docs(DataTable): remove example form inputs
1 parent 8b9c366 commit 334b4fb

File tree

2 files changed

+10
-51
lines changed

2 files changed

+10
-51
lines changed

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

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -142,15 +142,16 @@
142142
}
143143

144144
// 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 {
145+
146+
.#{$prefix}--data-table .#{$prefix}--list-box input[role='combobox'],
147+
.#{$prefix}--data-table .#{$prefix}--list-box input[type='text'],
148+
.#{$prefix}--data-table .#{$prefix}--dropdown,
149+
.#{$prefix}--data-table .#{$prefix}--list-box,
150+
.#{$prefix}--data-table .#{$prefix}--number input[type='number'],
151+
.#{$prefix}--data-table .#{$prefix}--number__control-btn::before,
152+
.#{$prefix}--data-table .#{$prefix}--number__control-btn::after,
153+
.#{$prefix}--data-table .#{$prefix}--text-input,
154+
.#{$prefix}--data-table .#{$prefix}--select-input {
154155
background-color: $field-02;
155156
}
156157

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

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
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';
1210

1311
export const rows = [
1412
{
@@ -19,12 +17,6 @@ export const rows = [
1917
rule: 'Round robin',
2018
attached_groups: 'Kevin’s VM Groups',
2119
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-
),
2820
},
2921
{
3022
id: 'b',
@@ -34,12 +26,6 @@ export const rows = [
3426
rule: 'Round robin',
3527
attached_groups: 'Maureen’s VM Groups',
3628
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-
),
4329
},
4430
{
4531
id: 'c',
@@ -49,12 +35,6 @@ export const rows = [
4935
rule: 'DNS delegation',
5036
attached_groups: 'Andrew’s VM Groups',
5137
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-
),
5838
},
5939
{
6040
id: 'd',
@@ -64,12 +44,6 @@ export const rows = [
6444
rule: 'Round robin',
6545
attached_groups: 'Marc’s VM Groups',
6646
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-
),
7347
},
7448
{
7549
id: 'e',
@@ -79,12 +53,6 @@ export const rows = [
7953
rule: 'Round robin',
8054
attached_groups: 'Mel’s VM Groups',
8155
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-
),
8856
},
8957
{
9058
id: 'f',
@@ -94,12 +62,6 @@ export const rows = [
9462
rule: 'DNS delegation',
9563
attached_groups: 'Ronja’s VM Groups',
9664
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-
),
10365
},
10466
];
10567

@@ -128,10 +90,6 @@ export const headers = [
12890
key: 'status',
12991
header: 'Status',
13092
},
131-
{
132-
key: 'foo',
133-
header: 'foo',
134-
},
13593
];
13694

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

0 commit comments

Comments
 (0)