Skip to content

Commit

Permalink
chore: rename Importer.isValid to Importer.canSubmit
Browse files Browse the repository at this point in the history
We are not really checking the validity of the form.
  • Loading branch information
yohanboniface committed Dec 5, 2024
1 parent 1f13c6e commit b692cb0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions umap/static/umap/js/modules/importer.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export default class Importer extends Utils.WithTemplate {
)
this.qs('[name=layer-name]').toggleAttribute('hidden', Boolean(this.layerId))
this.qs('#clear').toggleAttribute('hidden', !this.layerId)
this.qs('[name=submit').toggleAttribute('disabled', !this.isValid())
this.qs('[name=submit').toggleAttribute('disabled', !this.canSubmit())
}

onFileChange(e) {
Expand Down Expand Up @@ -258,7 +258,7 @@ export default class Importer extends Utils.WithTemplate {
this.qs('[type=file]').showPicker()
}

isValid() {
canSubmit() {
if (!this.format) return false
const hasFiles = Boolean(this.files.length)
const hasRaw = Boolean(this.raw)
Expand Down

0 comments on commit b692cb0

Please sign in to comment.