UNPKG

react-antd-admin-panel

Version:

Easy prototyping admin panel using React and Antd

28 lines 982 B
import Default from "./Default"; export default class Autocomplete extends Default { constructor() { super('Autocomplete'); this._format = (v) => { var _a, _b; return (_b = (_a = v.object) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : console.log('Autocomplete: you should implement a format function.'); }; } clearSelf() { this._defaultObject = undefined; try { this.tsxClear(); window.localStorage.removeItem(`autocomplete:${this._key}`); } catch (e) { console.log(e); } } defaultFromCache() { try { let store = window.localStorage.getItem(`autocomplete:${this._key}`); this._defaultObject = store ? JSON.parse(store) : this._defaultObject; } catch (e) { console.log(e); } return this; } } //# sourceMappingURL=Autocomplete.js.map