mirror of
https://github.com/silverstripe/silverstripe-tagfield
synced 2024-10-22 11:05:32 +02:00
Merge branch '2.2'
This commit is contained in:
commit
d24400cbbd
@ -1,5 +1,5 @@
|
||||
import Injector from 'lib/Injector';
|
||||
import TagField from 'components/TagField';
|
||||
import TagField from '../components/TagField';
|
||||
|
||||
export default () => {
|
||||
Injector.component.registerMany({
|
||||
|
@ -65,6 +65,7 @@
|
||||
"enzyme-adapter-react-15.4": "^1.0.5",
|
||||
"html-loader": "^0.5.1",
|
||||
"jest-cli": "^19.0.2",
|
||||
"react-addons-test-utils": "15.3.1",
|
||||
"webpack": "^2"
|
||||
},
|
||||
"dependencies": {
|
||||
|
@ -269,10 +269,20 @@ class StringTagField extends DropdownField
|
||||
|
||||
$name = $this->getName();
|
||||
|
||||
$record->$name = implode(',', $this->Value());
|
||||
$record->$name = $this->dataValue();
|
||||
$record->write();
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensure that arrays are imploded before being saved
|
||||
*
|
||||
* @return mixed|string
|
||||
*/
|
||||
public function dataValue()
|
||||
{
|
||||
return implode(',', $this->value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a JSON string of tags, for lazy loading.
|
||||
*
|
||||
|
@ -6651,6 +6651,10 @@ rc@^1.0.1, rc@^1.1.6, rc@^1.2.7:
|
||||
minimist "^1.2.0"
|
||||
strip-json-comments "~2.0.1"
|
||||
|
||||
react-addons-test-utils@15.3.1:
|
||||
version "15.3.1"
|
||||
resolved "https://registry.yarnpkg.com/react-addons-test-utils/-/react-addons-test-utils-15.3.1.tgz#b3b64e15d7d85f6d190020dca641218684b1124d"
|
||||
|
||||
react-dom@15.3.1:
|
||||
version "15.3.1"
|
||||
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-15.3.1.tgz#6d42cd2b64c8c5e0b693f3ffaec301e6e627e24e"
|
||||
|
Loading…
Reference in New Issue
Block a user