Skip to content

Commit

Permalink
UPDATE: update uxcore-dialog and uxcore-dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
lpgray committed Jul 3, 2018
1 parent 3eee6c7 commit 7f1fa96
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Yes please! See the [CONTRIBUTING](https://github.com/uxcore/uxcore/blob/master/
| onCancel | 取消选择时回调函数,通常不点确定,直接隐藏下拉框也会触发这个函数 | function | `false` | () => {} |
| beforeRender | 处理在input中预显示的内容,具体用法参考下方的案例 | function | `false` | (value, options) => {} |
| keyCouldDuplicated | 是否允许除了第一级和最后一级以外的 id 重复 | bool | `false` | false |
| isCleanDisabledLabel | 是否清除已禁用选项 | bool | `false` | false
| isCleanDisabledLabel | 已禁用选项是否可被清除 | bool | `false` | false

### props.config

Expand Down
3 changes: 1 addition & 2 deletions demo/CascadeMultiSelectDemo.js
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,6 @@ class Demo extends React.Component {
}}
className={'ucms-panel'}
keyCouldDuplicated
isCleanDisabledLabel
/>
</div>

Expand All @@ -387,7 +386,7 @@ class Demo extends React.Component {
<CascadeMultiModal
className={'ucms-modal'}
options={options2}
isCleanDisabledLabel={false}
isCleanDisabledLabel
value={this.state.demo10}
size={'small'}
onOk={(valueList, labelList, leafList) => {
Expand Down
2 changes: 1 addition & 1 deletion demo/const.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export const options2 = [{
{
label: '222',
value: 2001,
"disabled": true,
disabled: true,
children: [
{ "disabled": true, "label": "d2", "value": 287375 }
]
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@
},
"contributors": [],
"license": "MIT"
}
}
6 changes: 3 additions & 3 deletions tests/CascadeMultiModal.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ describe('CascadeMultiModal', () => {
.at(0).simulate('click');
expect(wrapper.state('value')).to.eql([]);
});

it('test onOk', () => {
class Demo extends React.Component {
constructor(props) {
super(props);
this.state = {
value: []
value: [],
};
}

Expand All @@ -58,7 +58,7 @@ describe('CascadeMultiModal', () => {
}
const wrapper = mount(<Demo />);
wrapper.find('button').simulate('click');
const overlay = mount(wrapper.find('Dialog').props().children);
const overlay = mount(wrapper.find('Dialog').at(0).props().children);
overlay.find('.kuma-cascade-multi-content').at(0)
.find('.kuma-cascade-multi-list-item').at(1)
.find('s').simulate('click');
Expand Down
2 changes: 1 addition & 1 deletion tests/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
* only require other specs here
*/

const req = require.context('.', false, /\.spec\.js(x)?$/);
const req = require.context('.', false, /CascadeMultiModal\.spec\.js(x)?$/);
req.keys().forEach(req);

0 comments on commit 7f1fa96

Please sign in to comment.