Skip to content

Commit

Permalink
Fixed issue with loading filters
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Apr 30, 2021
1 parent c407c61 commit 614472d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
3 changes: 3 additions & 0 deletions ui/src/app/dashboard/component/Ordered.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ export const getId = (entity) => {
};

export const mergeOrderFn = (entities, order) => {
if (!entities) {
return [];
}
const ordered = [...entities.sort(
(a, b) => {
const aIndex = order.indexOf(getId(a));
Expand Down
4 changes: 2 additions & 2 deletions ui/src/app/metadata/component/MetadataConfiguration.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function MetadataConfiguration ({ configuration }) {
return (
<>
{ configuration && configuration.sections.map((section, sidx) =>
<>
<React.Fragment key={sidx}>
{section?.properties?.length > 0 &&
<MetadataSection section={section} key={sidx} index={ sidx } onEdit={editable ? onEdit : null}>
<div className="d-flex border-bottom border-light border-2 py-2">
Expand All @@ -36,7 +36,7 @@ export function MetadataConfiguration ({ configuration }) {
<ObjectProperty property={section} columns={columns}></ObjectProperty>
</MetadataSection>
}
</>
</React.Fragment>
) }
</>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ export function MetadataFilters ({ providerId, types = [], filters, children })

/*eslint-disable react-hooks/exhaustive-deps*/
React.useEffect(() => {
if (!filters) {
if (!filterData) {
loadFilters(providerId);
} else {
setFilterData(filters);
setFilterData(filterData);
}
}, [providerId]);


return (
<MetadataFiltersContext.Provider value={filters}>{children}</MetadataFiltersContext.Provider>
<MetadataFiltersContext.Provider value={filterData}>{children}</MetadataFiltersContext.Provider>
);
}
2 changes: 1 addition & 1 deletion ui/src/app/metadata/view/MetadataHistory.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export function MetadataHistory () {
</div>
</td>
<td>
{i === 0 ? <Link to="['../', 'options']">
{i === 0 ? <Link to={`/metadata/${type}/${id}/configuration/options` }>
<FormattedDate time={true} date={version.date} />&nbsp;(<Translate value="label.current">Current</Translate>)
</Link>
:
Expand Down
2 changes: 1 addition & 1 deletion ui/src/setupProxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const { createProxyMiddleware } = require('http-proxy-middleware');

module.exports = function (app) {

const port = 10101;
const port = 8080;

app.use(
'/api',
Expand Down

0 comments on commit 614472d

Please sign in to comment.