@capillarytech/creatives-library 2.0.16 → 2.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -64,7 +64,7 @@ function SlideBoxContent(props) {
64
64
  handlePeviewTemplate={onPreviewTemplate}
65
65
  location={location}
66
66
  createNew={onCreateNew}
67
- channel={channel}
67
+ channel={channel.toLowerCase()}
68
68
  onChannelChange={onChannelChange}
69
69
  />
70
70
  )}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "2.0.16",
4
+ "version": "2.0.18",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -1,15 +1,16 @@
1
1
  //https://github.com/facebook/react/issues/11488#issuecomment-470623779
2
- export default function callNativeEvent({field, value, ev}) {
3
- const event = ev;
2
+ export default function callNativeEvent({field, value, event}) {
3
+ //cuz in react 16 native events does not work
4
+ const ev = event;
4
5
  const input = field;
5
6
  const lastValue = input.value;
6
7
  input.value = value;
7
8
  // hack React15
8
- event.simulated = true;
9
+ ev.simulated = true;
9
10
  // hack React16 内部定义了descriptor拦截value,此处重置状态
10
11
  const tracker = input._valueTracker;
11
12
  if (tracker) {
12
13
  tracker.setValue(lastValue);
13
14
  }
14
- input.dispatchEvent(event);
15
+ input.dispatchEvent(ev);
15
16
  }