@imposium-hub/components 1.24.7 → 1.24.9
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.
|
@@ -14,6 +14,7 @@ interface ISelectFieldProps {
|
|
|
14
14
|
selectRef? : any;
|
|
15
15
|
options : any;
|
|
16
16
|
disable ? : boolean;
|
|
17
|
+
disableFirst ? : boolean;
|
|
17
18
|
tooltip ? : IToolTipConfig | string;
|
|
18
19
|
placeholder? : string;
|
|
19
20
|
value : any;
|
|
@@ -42,7 +43,7 @@ class SelectField extends React.PureComponent<ISelectFieldProps, {}> {
|
|
|
42
43
|
|
|
43
44
|
public render() {
|
|
44
45
|
|
|
45
|
-
const {label, placeholder, options, value, width, buttons, selectRef, disable, tooltip, info, labelPosition} = this.props;
|
|
46
|
+
const {label, placeholder, options, value, width, buttons, selectRef, disable, tooltip, info, labelPosition, disableFirst} = this.props;
|
|
46
47
|
let opts = [];
|
|
47
48
|
|
|
48
49
|
const caret = <div key = 'caret' className = 'caret'>{ICON_CARET_DOWN}</div>;
|
|
@@ -60,9 +61,11 @@ class SelectField extends React.PureComponent<ISelectFieldProps, {}> {
|
|
|
60
61
|
|
|
61
62
|
if (options) {
|
|
62
63
|
opts = options.map((option , i) => {
|
|
64
|
+
|
|
65
|
+
const disabled = (i === 0 && disableFirst) ? true : false;
|
|
63
66
|
const optionValue = (option.value !== undefined) ? option.value : option;
|
|
64
67
|
const optionLabel = (option.label !== undefined) ? option.label : option;
|
|
65
|
-
return <option key = {`option-${optionValue}`} value = {optionValue}>{optionLabel}</option>;
|
|
68
|
+
return <option disabled = {disabled} key = {`option-${optionValue}`} value = {optionValue}>{optionLabel}</option>;
|
|
66
69
|
});
|
|
67
70
|
}
|
|
68
71
|
|
|
@@ -355,7 +355,7 @@ class StoryPreviewer extends React.PureComponent<IStoryPreviewerProps, IStoryPre
|
|
|
355
355
|
}
|
|
356
356
|
}
|
|
357
357
|
|
|
358
|
-
private getExperience(experienceId, triggerJob = false, compositionId ? : string) {
|
|
358
|
+
private getExperience(experienceId, triggerJob = false, compositionId ? : string, useWorkingCopy? : boolean) {
|
|
359
359
|
|
|
360
360
|
if (!this.timer.running) {
|
|
361
361
|
this.timer.start();
|
|
@@ -371,7 +371,7 @@ class StoryPreviewer extends React.PureComponent<IStoryPreviewerProps, IStoryPre
|
|
|
371
371
|
}, () => {
|
|
372
372
|
|
|
373
373
|
if (triggerJob) {
|
|
374
|
-
api.triggerEvent(experienceId, compositionId).then((resTrigger) => {
|
|
374
|
+
api.triggerEvent(experienceId, compositionId, useWorkingCopy).then((resTrigger) => {
|
|
375
375
|
|
|
376
376
|
this.setState({
|
|
377
377
|
jobId: resTrigger.job_id
|
|
@@ -471,7 +471,7 @@ class StoryPreviewer extends React.PureComponent<IStoryPreviewerProps, IStoryPre
|
|
|
471
471
|
onExperienceCreated(resExp);
|
|
472
472
|
}
|
|
473
473
|
|
|
474
|
-
this.getExperience(resExp.id, true, compositionId);
|
|
474
|
+
this.getExperience(resExp.id, true, compositionId, useWorkingCopy);
|
|
475
475
|
|
|
476
476
|
}).catch((e) => {
|
|
477
477
|
this.resetState();
|