Skip to content

Commit d03a02d

Browse files
committed
remove search filter and fix css issue
1 parent 4d75755 commit d03a02d

File tree

4 files changed

+6
-33
lines changed

4 files changed

+6
-33
lines changed

client/packages/lowcoder/src/comps/comps/tableComp/tablePropertyView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ const ColumnDropdown = styled(Dropdown)`
100100
const ColumnBatchOptionWrapper = styled.div`
101101
display: flex;
102102
align-items: center;
103-
color: ${GreyTextColor}
103+
color: ${GreyTextColor};
104104
line-height: 16px;
105105
font-size: 13px;
106106
`;

client/packages/lowcoder/src/comps/comps/tableLiteComp/tableComp.tsx

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -307,32 +307,19 @@ export class TableImplComp extends TableInitComp {
307307
)[0];
308308
}
309309

310-
// handle hide/search/filter: sortedData->filteredData
310+
// handle filter: sortedData -> filteredData (pass-through for now)
311311
filterNode() {
312312
const nodes = {
313313
data: this.sortDataNode(),
314-
searchValue: this.children.searchText.node(),
315314
};
316-
let context = this;
317-
318-
const filteredDataNode = withFunction(fromRecord(nodes), (input) => {
319-
const { data, searchValue } = input;
320-
const filteredData = filterData(data, searchValue.value, { filters: [], stackType: "and" }, false);
321-
322-
if (Boolean(searchValue.value) && data.length !== filteredData.length) {
323-
const onEvent = context.children.onEvent.getView();
324-
setTimeout(() => {
325-
onEvent("dataSearch");
326-
});
327-
}
328-
329-
return filteredData.map((row) => tranToTableRecord(row, row[OB_ROW_ORI_INDEX]));
315+
const filteredDataNode = withFunction(fromRecord(nodes), ({ data }) => {
316+
return data.map((row) => tranToTableRecord(row, row[OB_ROW_ORI_INDEX]));
330317
});
331-
332318
return lastValueIfEqual(this, "filteredDataNode", [filteredDataNode, nodes] as const, (a, b) =>
333319
shallowEqual(a[1], b[1])
334320
)[0];
335321
}
322+
336323

337324

338325
oriDisplayDataNode() {

client/packages/lowcoder/src/comps/comps/tableLiteComp/tablePropertyView.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ const ColumnDropdown = styled(Dropdown)`
100100
const ColumnBatchOptionWrapper = styled.div`
101101
display: flex;
102102
align-items: center;
103-
color: ${GreyTextColor}
103+
color: ${GreyTextColor};
104104
line-height: 16px;
105105
font-size: 13px;
106106
`;
@@ -517,11 +517,6 @@ export function compTablePropertyView<T extends MultiBaseComp<TableChildrenType>
517517
{hiddenPropertyView(comp.children)}
518518
{loadingPropertyView(comp.children)}
519519
{comp.children.selection.getPropertyView()}
520-
{comp.children.searchText.propertyView({
521-
label: trans("table.searchText"),
522-
tooltip: trans("table.searchTextTooltip"),
523-
placeholder: "{{input1.value}}",
524-
})}
525520
</Section>
526521

527522
<Section name={"Summary"}>

client/packages/lowcoder/src/comps/comps/tableLiteComp/tableTypes.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import {
77
ColorOrBoolCodeControl,
88
HeightOrBoolCodeControl,
99
JSONObjectArrayControl,
10-
RadiusControl,
11-
StringControl,
1210
} from "comps/controls/codeControl";
1311
import { dropdownControl } from "comps/controls/dropdownControl";
1412
import { eventHandlerControl } from "comps/controls/eventHandlerControl";
@@ -79,12 +77,6 @@ export const TableEventOptions = [
7977
value: "rowClick",
8078
description: trans("table.rowClick"),
8179
},
82-
83-
{
84-
label: trans("table.search"),
85-
value: "dataSearch",
86-
description: trans("table.search"),
87-
},
8880
{
8981
label: trans("table.download"),
9082
value: "download",
@@ -211,7 +203,6 @@ const tableChildrenMap = {
211203
toolbarStyle: styleControl(TableToolbarStyle, 'toolbarStyle'),
212204
hideToolbar: withDefault(BoolControl,false),
213205
headerStyle: styleControl(TableHeaderStyle, 'headerStyle'),
214-
searchText: StringControl,
215206
columnsStyle: styleControl(TableColumnStyle, 'columnsStyle'),
216207
viewModeResizable: BoolControl,
217208
visibleResizables: BoolControl,

0 commit comments

Comments
 (0)