mdb-ui-kit/js/baseFormControl.js
FezVrasta 750ba9b897 The big leap 🚀💨
2017-08-11 16:59:31 +02:00

33 lines
826 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;