Skip to content

Commit

Permalink
Fixes issue
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed May 5, 2022
1 parent ff42570 commit 73ba91a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
5 changes: 2 additions & 3 deletions ui/src/app/metadata/editor/MetadataEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export function MetadataEditor ({ restore, current, reload }) {
function save(metadata) {
update(`/${id}`, definition.parser(metadata, base))
.then(() => {
notificationDispatch(createNotificationAction('Entity saved'));
gotoDetail({ refresh: true });
})
.catch((err) => {
Expand All @@ -70,9 +71,7 @@ export function MetadataEditor ({ restore, current, reload }) {

const gotoDetail = (state = null) => {
setBlocking(false);

console.log(`/metadata/${type}/${id}`);
history.push(`/metadata/${type}/${id}`, state);
setTimeout(() => history.push(`/metadata/${type}/${id}`, state) );
};

const onNavigate = (path) => {
Expand Down
4 changes: 3 additions & 1 deletion ui/src/app/metadata/new/NewFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ export function NewFilter() {

const gotoDetail = (state = null) => {
setBlocking(false);
history.push(`/metadata/provider/${id}`, state);
setTimeout(() => {
history.push(`/metadata/provider/${id}`, state);
});
};

const onNavigate = (path) => {
Expand Down
7 changes: 5 additions & 2 deletions ui/src/app/metadata/wizard/MetadataFilterTypeSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,13 @@ export function MetadataFilterTypeSelector({ types = [], children, actions}) {
<span><Translate value={'label.metadata-provider-type'} /></span>
<InfoIcon value="tooltip.metadata-provider-type" />
</Form.Label>
<Form.Control as="select" defaultValue={''} placeholder={translator(`label.select-metadata-type`)} {...register('type', { required: true })}>
<Form.Select
defaultValue={''}
placeholder={translator(`label.select-metadata-type`)}
{...register('type', { required: true })}>
<option disabled value="">{translator(`label.select-metadata-type`)}</option>
{types.map(t => <option key={t} value={t}>{t}</option>)}
</Form.Control>
</Form.Select>
</Form.Group>
</Form>
</div>
Expand Down

0 comments on commit 73ba91a

Please sign in to comment.