1
0
mirror of https://gitlab.com/bramw/baserow.git synced 2024-11-21 23:37:55 +00:00
bramw_baserow/web-frontend/modules/database/mixins/numberField.js
2021-07-11 18:02:37 +00:00

15 lines
394 B
JavaScript

import { NumberFieldType } from '@baserow/modules/database/fieldTypes'
/**
* This mixin contains some method overrides for validating and formatting the
* number field. This mixin is used in both the GridViewFieldNumber and
* RowEditFieldNumber components.
*/
export default {
methods: {
beforeSave(value) {
return NumberFieldType.formatNumber(this.field, value)
},
},
}