mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2024-11-14 05:37:01 +03:00
37 lines
825 B
JavaScript
37 lines
825 B
JavaScript
|
import BaseInput from './baseInput'
|
||
|
|
||
|
const BaseFormControl = (($) => {
|
||
|
|
||
|
/**
|
||
|
* ------------------------------------------------------------------------
|
||
|
* Constants
|
||
|
* ------------------------------------------------------------------------
|
||
|
*/
|
||
|
const Default = {
|
||
|
requiredClasses: ['form-control']
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* ------------------------------------------------------------------------
|
||
|
* Class Definition
|
||
|
* ------------------------------------------------------------------------
|
||
|
*/
|
||
|
class BaseFormControl extends BaseInput {
|
||
|
|
||
|
constructor($element, config) {
|
||
|
super($element, $.extend(true, Default, config))
|
||
|
|
||
|
// Initially mark as empty
|
||
|
if (this.isEmpty()) {
|
||
|
this.removeIsFilled()
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
return BaseFormControl
|
||
|
|
||
|
})(jQuery)
|
||
|
|
||
|
export default BaseFormControl
|