Skip to content

Commit 85584aa

Browse files
committed
refactor(units): rename isPosting to posting
1 parent 9190893 commit 85584aa

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Units/Form/index.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const MESSAGE_PUT_ERROR =
4141
* @param {object} props Valid form properties
4242
* @param {object} props.unit Valid unit object
4343
* @param {boolean} props.isEditForm Flag wether form is on edit mode
44-
* @param {boolean} props.isPosting Flag whether form is posting data
44+
* @param {boolean} props.posting Flag whether form is posting data
4545
* @param {Function} props.onCancel Form cancel callback
4646
* @returns {object} UnitForm component
4747
* @author lally elias <lallyelias87@gmail.com>
@@ -55,12 +55,12 @@ const MESSAGE_PUT_ERROR =
5555
* <UnitForm
5656
* unit={unit}
5757
* isEditForm={isEditForm}
58-
* isPosting={isPosting}
58+
* posting={posting}
5959
* onCancel={this.handleCloseUnitForm}
6060
* />
6161
*
6262
*/
63-
const UnitForm = ({ unit, isEditForm, isPosting, onCancel }) => {
63+
const UnitForm = ({ unit, isEditForm, posting, onCancel }) => {
6464
// form finish(submit) handler
6565
const onFinish = (values) => {
6666
if (isEditForm) {
@@ -153,7 +153,7 @@ const UnitForm = ({ unit, isEditForm, isPosting, onCancel }) => {
153153
style={{ marginLeft: 8 }}
154154
type="primary"
155155
htmlType="submit"
156-
loading={isPosting}
156+
loading={posting}
157157
>
158158
Save
159159
</Button>
@@ -181,7 +181,7 @@ UnitForm.propTypes = {
181181
}),
182182
}),
183183
isEditForm: PropTypes.bool.isRequired,
184-
isPosting: PropTypes.bool.isRequired,
184+
posting: PropTypes.bool.isRequired,
185185
onCancel: PropTypes.func.isRequired,
186186
};
187187

src/Units/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ class UnitList extends Component {
453453
>
454454
<UnitForm
455455
unit={unit}
456-
isPosting={posting}
456+
posting={posting}
457457
isEditForm={isEditForm}
458458
onCancel={this.handleFormClose}
459459
/>

0 commit comments

Comments
 (0)