Skip to content

Commit

Permalink
Updates for Yuhuais comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bp-cos committed Feb 1, 2024
1 parent be26596 commit edfed7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ export default class CedarMetadataEditor extends Component<Args> {
// eslint-disable-next-line
// @ts-ignore
this.cedarEmbeddableEditor.instanceObject = this.args.cedarMetadataRecord.metadata;
this.changed();
this.validateCedarMetadata();
}
}

@action
changed() {
validateCedarMetadata() {
// eslint-disable-next-line
// @ts-ignore
const report = this.cedarEmbeddableEditor.dataQualityReport;
Expand All @@ -72,7 +72,7 @@ export default class CedarMetadataEditor extends Component<Args> {
async save() {
// This is because you can clear a field without it changing
// The form can change from valid to invalid
this.changed();
this.validateCedarMetadata();
let record: CedarMetadataRecordModel;
if (this.isEdit) {
record = this.args.cedarMetadataRecord!;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{{did-insert this.injectMetadata}}
local-class='cedar-editor'
config={{this.cedarConfig}}
{{ on 'change' (action this.changed) }}
{{ on 'change' (action this.validateCedarMetadata) }}
templateObject={{@cedarMetadataTemplate.template}}
/>
</div>
Expand Down

0 comments on commit edfed7d

Please sign in to comment.