@geo2france/api-dashboard 1.6.1 → 1.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -62,7 +62,7 @@ export const DSL_Dataset = ({ children, id, provider: provider_input, type: prov
62
62
  React.Children.toArray(children)
63
63
  .filter((c) => React.isValidElement(c))
64
64
  .filter((c) => typeof c.type != 'string' && c.type.name == Filter.name).forEach((c) => {
65
- const value = String(c.props.children).trim() || controls?.[c.props.control];
65
+ const value = (typeof c.props.children === "string" ? c.props.children.trim() : c.props.children) || controls?.[c.props.control];
66
66
  filters.push({
67
67
  operator: c.props.operator || 'eq',
68
68
  value: value,
@@ -1,7 +1,7 @@
1
1
  import { CrudOperators } from "../../data_providers/types";
2
2
  interface IFilterProps {
3
3
  field: string;
4
- children?: string;
4
+ children?: string | string[];
5
5
  control?: string;
6
6
  operator?: Exclude<CrudOperators, "or" | "and">;
7
7
  }
@@ -15,6 +15,7 @@ export const generateFilter = (filters) => {
15
15
  case "endswith":
16
16
  return `*${filter.value}`;
17
17
  case "in":
18
+ console.log(filter.value);
18
19
  return filter.value.join(' ');
19
20
  }
20
21
  })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geo2france/api-dashboard",
3
- "version": "1.6.1",
3
+ "version": "1.6.2",
4
4
  "private": false,
5
5
  "description": "Build dashboards with JSX/TSX",
6
6
  "main": "dist/index.js",