Skip to content

Commit 844b770

Browse files
committed
Fix Dash Table filter options position
1 parent 7c6713b commit 844b770

File tree

2 files changed

+25
-19
lines changed

2 files changed

+25
-19
lines changed

components/dash-table/src/dash-table/components/Filter/Column.tsx

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -60,23 +60,25 @@ export default class ColumnFilter extends PureComponent<
6060
data-dash-column={columnId}
6161
style={style}
6262
>
63-
<IsolatedInput
64-
onCopy={(e: any) => {
65-
e.stopPropagation();
66-
TableClipboardHelper.clearClipboard();
67-
}}
68-
onPaste={(e: any) => {
69-
e.stopPropagation();
70-
}}
71-
value={value}
72-
placeholder={'filter data...'}
73-
stopPropagation={true}
74-
submit={this.submit}
75-
/>
76-
<FilterOptions
77-
filterOptions={filterOptions}
78-
toggleFilterOptions={toggleFilterOptions}
79-
/>
63+
<div>
64+
<FilterOptions
65+
filterOptions={filterOptions}
66+
toggleFilterOptions={toggleFilterOptions}
67+
/>
68+
<IsolatedInput
69+
onCopy={(e: any) => {
70+
e.stopPropagation();
71+
TableClipboardHelper.clearClipboard();
72+
}}
73+
onPaste={(e: any) => {
74+
e.stopPropagation();
75+
}}
76+
value={value}
77+
placeholder={'filter data...'}
78+
stopPropagation={true}
79+
submit={this.submit}
80+
/>
81+
</div>
8082
</th>
8183
);
8284
}

components/dash-table/src/dash-table/components/Table/Table.less

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,6 @@
476476
position: relative;
477477

478478
& input {
479-
position: absolute;
480479
left: 0;
481480
top: 0;
482481
height: 100%;
@@ -687,8 +686,13 @@
687686
}
688687

689688
.dash-spreadsheet-inner {
690-
.dash-header>div {
689+
.dash-header>div,
690+
.dash-filter>div {
691691
display: flex;
692+
693+
input[type="text"] {
694+
flex: 1;
695+
}
692696
}
693697
.column-actions {
694698
display: flex;

0 commit comments

Comments
 (0)