@civicactions/cmsds-open-data-components 3.1.9-alpha.1 → 3.1.10-alpha.1

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.
package/dist/main.js CHANGED
@@ -576,7 +576,7 @@ const $52c6454cae137465$var$DatasetSearchListItem = (props)=>{
576
576
  /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
577
577
  className: "ds-l-row",
578
578
  children: /*#__PURE__*/ (0, $hgUW1$jsx)("div", {
579
- className: "ds-l-col--12 ds-l-md-col--12",
579
+ className: "ds-l-col--12 ds-l-md-col--12 ds-u-margin-top--2",
580
580
  children: (0, $1a2bf34e2a8f6b80$export$59a943b34a82e690)(description)
581
581
  })
582
582
  }),
@@ -1307,11 +1307,9 @@ var $b4aa9c66f2e86959$export$2e2bcd8739ae039 = $b4aa9c66f2e86959$var$useMetastor
1307
1307
  const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, additionalParams = {})=>{
1308
1308
  const keys = options.keys ? options.keys : true;
1309
1309
  const { prepareColumns: prepareColumns } = options;
1310
- const [values, setValues] = (0, $hgUW1$useState)([]);
1311
1310
  const [id, setResource] = (0, $hgUW1$useState)(resourceId);
1312
1311
  const [rootUrl, setRootUrl] = (0, $hgUW1$useState)(rootAPIUrl);
1313
1312
  const [limit, setLimit] = (0, $hgUW1$useState)(options.limit ? options.limit : 20);
1314
- const [count, setCount] = (0, $hgUW1$useState)(null);
1315
1313
  const [columns, setColumns] = (0, $hgUW1$useState)([]);
1316
1314
  const [offset, setOffset] = (0, $hgUW1$useState)(options.offset ? options.offset : 0);
1317
1315
  const [conditions, setConditions] = (0, $hgUW1$useState)(options.conditions ? options.conditions : undefined);
@@ -1349,7 +1347,6 @@ const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, add
1349
1347
  (0, $hgUW1$useEffect)(()=>{
1350
1348
  if (data) {
1351
1349
  const propertyKeys = data.schema && data.schema[id] && data.schema[id].fields ? Object.keys(data.schema[id].fields) : [];
1352
- setValues(data.results), setCount(data.count);
1353
1350
  if (propertyKeys.length) setColumns(prepareColumns ? prepareColumns(propertyKeys) : propertyKeys);
1354
1351
  if (data.schema) setSchema(data.schema);
1355
1352
  }
@@ -1358,8 +1355,8 @@ const $1d3d480a9cfaabe0$var$useDatastore = (resourceId, rootAPIUrl, options, add
1358
1355
  ]);
1359
1356
  return {
1360
1357
  loading: enabled ? isPending : false,
1361
- values: values,
1362
- count: count,
1358
+ values: data ? data.results : undefined,
1359
+ count: data ? data.count : null,
1363
1360
  columns: columns,
1364
1361
  limit: limit,
1365
1362
  offset: offset,