Skip to content

Commit

Permalink
Merge pull request #346 from gisce/fix/searchfilter_widgets_adjustment
Browse files Browse the repository at this point in the history
Use new widget property in fields and ditch form parsing in search fields
  • Loading branch information
mguellsegarra authored Sep 5, 2023
2 parents 1608f4d + c7c9ca4 commit 2a5ad3a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 17 deletions.
18 changes: 9 additions & 9 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gisce/react-ooui",
"version": "1.4.7",
"version": "1.4.8",
"files": [
"dist",
"src",
Expand Down Expand Up @@ -33,7 +33,7 @@
"dependencies": {
"@ant-design/plots": "^1.0.9",
"@gisce/fiber-diagram": "^1.1.0-rc.3",
"@gisce/ooui": "^0.22.1",
"@gisce/ooui": "^0.22.2",
"@gisce/react-formiga-components": "^1.0.9-rc.21",
"@gisce/react-formiga-table": "^0.8.4",
"@monaco-editor/react": "^4.4.5",
Expand Down
1 change: 0 additions & 1 deletion src/views/actionViews/GraphActionView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ export const GraphActionView = (props: GraphActionViewProps) => {
formView.search_fields,
treeView.search_fields,
])}
formXml={formView.arch}
limit={limit!}
onClear={clear}
offset={offset}
Expand Down
3 changes: 1 addition & 2 deletions src/widgets/views/SearchTree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -291,12 +291,11 @@ function SearchTree(props: Props, ref: any) {
return (
<>
<SearchFilter
fields={{ ...treeView.fields, ...formView.fields }}
fields={{ ...formView.fields, ...treeView.fields }}
searchFields={mergeSearchFields([
formView.search_fields,
treeView.search_fields,
])}
formXml={formView.arch}
onClear={clear}
limit={limit}
offset={offset}
Expand Down
4 changes: 1 addition & 3 deletions src/widgets/views/searchFilter/SearchFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ type Props = {
searchError?: string;
searchValues?: any;
showLimitOptions?: boolean;
formXml: string;
};

function SearchFilter(props: Props) {
Expand All @@ -49,7 +48,6 @@ function SearchFilter(props: Props) {
searchError,
searchValues,
showLimitOptions = true,
formXml,
} = props;

const [simpleSearchFields, setSimpleSearchFields] = useState<Container>();
Expand Down Expand Up @@ -89,7 +87,7 @@ function SearchFilter(props: Props) {

useDeepCompareEffect(() => {
setAdvancedFilter(false);
sfo.current = new SearchFilterOoui(searchFields, fields, formXml);
sfo.current = new SearchFilterOoui(searchFields, fields);
sfo.current.parse();
setSimpleSearchFields(sfo.current._simpleSearchContainer);
setAdvancedSearchFields(sfo.current._advancedSearchContainer);
Expand Down

0 comments on commit 2a5ad3a

Please sign in to comment.