react-antd-admin-panel
Version:
Easy prototyping admin panel using React and Antd
29 lines • 847 B
JavaScript
import Default from "./Default";
export default class Select extends Default {
constructor() {
super('Select');
this._format = (v) => v.value;
}
options(v) { this._options = v; return this; }
dataSource(v) {
this._dataSource = v;
this._fields = this._options(v);
return this;
}
clearSelf() {
this._defaultObject = undefined;
try {
this.tsxClear();
window.localStorage.removeItem(`radio:${this._key}`);
}
catch (e) {
console.log(e);
}
}
defaultFromCache() {
let store = window.localStorage.getItem(`select:${this._key}`);
this._defaultObject = store ? JSON.parse(store) : this._defaultObject;
return this;
}
}
//# sourceMappingURL=Select.js.map