Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /node_modules/keystone/admin/client/App/screens/Item/index.js
- {(this.props.params.listId === 'my-list-model') ? (
- <MyComponent>{this.props.params.listId}</MyComponent>
- ) : null }
- import keystone from 'keystone';
- import { someFunction } from './myFunctions';
- var MyListModel = new keystone.List('MyListModel', {
- map: { name: 'title' },
- });
- MyListModel.add({
- title: { type: String, required: true },
- data: { type: Types.Code, language: 'json', watch: 'title', value: watchTitle, noedit: true },
- });
- MyListModel.register();
- function watchTitle(callback) {
- if (this.title) {
- function cb(error, result) {
- if (result) {
- // Send result to React Component in Admin screen
- }
- callback(error, result);
- }
- someFunction(this.title, cb);
- } else {
- callback(null, '');
- }
- }
Add Comment
Please, Sign In to add comment