Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

Commit

Permalink
Merge #606
Browse files Browse the repository at this point in the history
606: Recipe filters get dropped automatically during editing r=rehandalal a=peterbe

Fixes #598

Co-authored-by: Peter Bengtsson <mail@peterbe.com>
  • Loading branch information
bors[bot] and peterbe committed Nov 28, 2018
2 parents 4e2de2d + 79c620d commit 3b71fa1
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/workflows/recipes/components/FilterObjectForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,17 @@ class FilterObjectForm extends React.PureComponent {
})(<SamplingInput disabled={disabled} formErrors={formErrors} />)}
</FormItem>
</Tabs.TabPane>
<Tabs.TabPane tab={tabLabels.browser} key="browser">
{/*
Note here about the 'forceRender' prop sent to TabPane...
It's important and necessary because of the nature of <FormItem>. If you don't at
least render it once, the <FormItem>'s interal setFieldValue won't take the
initialValue's content which is something that happens when it's rendered.
Since some tabs here might never be rendered (it's DOM based, not CSS
display:block|none) it might never set the data into the form object based on the
initial data we get when loading the recipe from the server with XHR that first
time.
*/}
<Tabs.TabPane tab={tabLabels.browser} key="browser" forceRender>
<Row gutter={16}>
<Col span={12}>
<FormItem
Expand Down Expand Up @@ -368,7 +378,7 @@ class FilterObjectForm extends React.PureComponent {
</Col>
</Row>
</Tabs.TabPane>
<Tabs.TabPane tab={tabLabels.geo} key="geo">
<Tabs.TabPane tab={tabLabels.geo} key="geo" forceRender>
<Row gutter={16} type="flex">
<Col span={12}>
<FormItem
Expand Down

0 comments on commit 3b71fa1

Please sign in to comment.