Skip to content

Commit

Permalink
支持是否让新穿梭的值排在尾部
Browse files Browse the repository at this point in the history
  • Loading branch information
阚自强 committed Nov 13, 2019
1 parent 838ca28 commit 4d60a8c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ Yes please! See the [CONTRIBUTING](https://github.com/uxcore/uxcore/blob/master/
|searchPlaceholder|string|optional|定位输入内容||
|leftTitle|string|optional|'未选中的'|左侧标题|
|rightTitle|string|optional|'已选中的'|右侧标题|
|isAsc|boolean|optional|false|是否让新穿梭的值排在尾部|

* more props: [FormField](http://uxcore.coding.me/components/form/#formfield-专属配置)

1 change: 1 addition & 0 deletions demo/TransferFormFieldDemo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ class Demo extends React.Component {
leftTitle="未选中"
rightTitle="已选中"
checkAllText="全选"
isAsc
/>
</FormRow>
<ButtonGroupFormField>
Expand Down
5 changes: 4 additions & 1 deletion src/TransferFormField.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class TransferFormField extends FormField {
const me = this;
const {
height, jsxdisabled, showSearch, searchPlaceholder, leftTitle,
rightTitle, checkAllText,
rightTitle, checkAllText, isAsc,
} = this.props;

const mode = me.props.jsxmode || me.props.mode;
Expand All @@ -46,19 +46,22 @@ class TransferFormField extends FormField {
leftTitle={leftTitle}
rightTitle={rightTitle}
checkAllText={checkAllText}
isAsc={isAsc}
/>
);
}
}

TransferFormField.defaultProps = assign({}, FormField.defaultProps, {
height: 220,
isAsc: false,
});

TransferFormField.propTypes = assign({}, FormField.propTypes, {
height: PropTypes.number,
value: PropTypes.array,
checkAllText: PropTypes.string,
isAsc: PropTypes.bool,
});

TransferFormField.displayName = 'TransferFormField';
Expand Down

0 comments on commit 4d60a8c

Please sign in to comment.