mirror of
https://github.com/dzeiocom/FormManager.git
synced 2025-07-29 16:29:51 +00:00
Added a formatValue
function
This commit is contained in:
@ -33,9 +33,9 @@ export default class FMDatalistInput extends FMInput {
|
||||
getValue(): string {
|
||||
if (this.datalist) {
|
||||
let option: HTMLOptionElement = this.datalist.querySelector(`[value="${this.element.value}"]`)
|
||||
if (option) return option.dataset.value
|
||||
if (option) return this.formatValue(option.dataset.value)
|
||||
}
|
||||
return this.isStrict ? undefined : this.element.value
|
||||
return this.isStrict ? undefined : this.formatValue(this.element.value)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user