admin-config
Advanced tools
Comparing version 0.2.15 to 0.2.16
@@ -8,5 +8,5 @@ import ChoiceField from "./ChoiceField"; | ||
this._choices = [ | ||
{ value: null, label: 'undefined' }, | ||
{ value: true, label: 'true' }, | ||
{ value: false, label: 'false' } | ||
{ value: null, label: 'undefined' }, | ||
{ value: true, label: 'true' }, | ||
{ value: false, label: 'false' } | ||
]; | ||
@@ -13,0 +13,0 @@ } |
@@ -10,2 +10,3 @@ import ReferenceField from "./ReferenceField"; | ||
this._detailLink = false; | ||
this._listActions = []; | ||
} | ||
@@ -46,4 +47,14 @@ | ||
} | ||
listActions(actions) { | ||
if (!arguments.length) { | ||
return this._listActions; | ||
} | ||
this._listActions = actions; | ||
return this; | ||
} | ||
} | ||
export default ReferencedListField; |
{ | ||
"name": "admin-config", | ||
"version": "0.2.15", | ||
"version": "0.2.16", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -11,2 +11,26 @@ # admin-config [![Build Status](https://travis-ci.org/marmelab/admin-config.svg?branch=master)](https://travis-ci.org/marmelab/admin-config) | ||
## Including In Another Library | ||
Require whatever class you need directly. | ||
```js | ||
// es5 | ||
var NumberField = require('admin-config/lib/Field/NumberField'); | ||
// es6 | ||
import NumberField from "admin-config/lib/Field/NumberField"; | ||
``` | ||
Admin-config is written in ES6. You'll need a transpiler to use any of the classes (we recommend [Webpack](http://webpack.github.io/) and [babel](https://babeljs.io/)). Here is an example Webpack configuration: | ||
```js | ||
module.exports = { | ||
// ... | ||
module: { | ||
loaders: [ | ||
{ test: /node_modules\/admin-config\/.*\.js$/, loader: 'babel' } | ||
] | ||
} | ||
}; | ||
``` | ||
## Running Tests | ||
@@ -13,0 +37,0 @@ |
159015
4090
40