Skip to content

Commit

Permalink
Merge branch 'master' into feat/1.15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
youluna committed May 27, 2019
2 parents c9b631b + 420964c commit 1a6480f
Show file tree
Hide file tree
Showing 32 changed files with 490 additions and 197 deletions.
44 changes: 44 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,49 @@
# Change Log

# [1.15.0](https://github.com/alibaba-fusion/next/compare/1.14.6...1.15.0) (2019-05-24)


### Bug Fixes

* fusion cool render issues ([fbdffaa](https://github.com/alibaba-fusion/next/commit/fbdffaa))
* **Calendar:** select month auto change date view ([354f545](https://github.com/alibaba-fusion/next/commit/354f545))
* **Field:** resetDefault when parseValue false ([e2c2b00](https://github.com/alibaba-fusion/next/commit/e2c2b00))
* **Message:** can`t close after click ([53fe94d](https://github.com/alibaba-fusion/next/commit/53fe94d))
* **Select:** init flatten ds ([57667a4](https://github.com/alibaba-fusion/next/commit/57667a4))
* **Select:** value no show fillProps with empty dataSource. Close [#715](https://github.com/alibaba-fusion/next/issues/715) ([70a15ab](https://github.com/alibaba-fusion/next/commit/70a15ab))


### Features

* **Select:** add api to customize show tag content ([4c29109](https://github.com/alibaba-fusion/next/commit/4c29109))
* **Select:** add maxTagPlaceholder ([bfc9b20](https://github.com/alibaba-fusion/next/commit/bfc9b20))




## [1.14.6](https://github.com/alibaba-fusion/next/compare/1.14.5...1.14.6) (2019-05-23)


### Bug Fixes

* **CascaderSelect:** Fixed [#676](https://github.com/alibaba-fusion/next/issues/676) ([b8a0ba2](https://github.com/alibaba-fusion/next/commit/b8a0ba2))
* **Field:** init values with parseName=false ([0c92cfb](https://github.com/alibaba-fusion/next/commit/0c92cfb))




## [1.14.5](https://github.com/alibaba-fusion/next/compare/1.14.4...1.14.5) (2019-05-22)


### Bug Fixes

* **Field:** parseName defaults ([#683](https://github.com/alibaba-fusion/next/issues/683)) ([7fe0130](https://github.com/alibaba-fusion/next/commit/7fe0130))
* **Field:** revert typescript of Field to any ([c35d935](https://github.com/alibaba-fusion/next/commit/c35d935))
* **Input:** maxLength in safari on Mac. Close [#671](https://github.com/alibaba-fusion/next/issues/671) ([f771d67](https://github.com/alibaba-fusion/next/commit/f771d67))
* **Tab:** should not listen to extra keyboard events ([50e1699](https://github.com/alibaba-fusion/next/commit/50e1699))



## [1.14.4](https://github.com/alibaba-fusion/next/compare/1.14.3...1.14.4) (2019-05-16)


Expand Down
20 changes: 9 additions & 11 deletions LATESTLOG.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
# Latest Log

## [1.14.4](https://github.com/alibaba-fusion/next/compare/1.14.3...1.14.4) (2019-05-16)
# [1.15.0](https://github.com/alibaba-fusion/next/compare/1.14.6...1.15.0) (2019-05-24)


### Bug Fixes

* fix DatePicker,Switch,Upload to a11y ([99ef836](https://github.com/alibaba-fusion/next/commit/99ef836))
* **Checkbox:** number 0 should be rendered ([93318d8](https://github.com/alibaba-fusion/next/commit/93318d8))
* **Field:** no react key props for errors ([93127d6](https://github.com/alibaba-fusion/next/commit/93127d6))
* **Menu:** Resolve expanding and selecting in uncontrolled mode ([#667](https://github.com/alibaba-fusion/next/issues/667)) ([0ba7e4a](https://github.com/alibaba-fusion/next/commit/0ba7e4a))
* **Menu:** Resolve items that created by `React.forwardRef` ([807d8de](https://github.com/alibaba-fusion/next/commit/807d8de))
* **Select:** hight first item with remote datasource. Close [#654](https://github.com/alibaba-fusion/next/issues/654) ([d784ee0](https://github.com/alibaba-fusion/next/commit/d784ee0))
* fusion cool render issues ([fbdffaa](https://github.com/alibaba-fusion/next/commit/fbdffaa))
* **Calendar:** select month auto change date view ([354f545](https://github.com/alibaba-fusion/next/commit/354f545))
* **Field:** resetDefault when parseValue false ([e2c2b00](https://github.com/alibaba-fusion/next/commit/e2c2b00))
* **Message:** can`t close after click ([53fe94d](https://github.com/alibaba-fusion/next/commit/53fe94d))
* **Select:** init flatten ds ([57667a4](https://github.com/alibaba-fusion/next/commit/57667a4))
* **Select:** value no show fillProps with empty dataSource. Close [#715](https://github.com/alibaba-fusion/next/issues/715) ([70a15ab](https://github.com/alibaba-fusion/next/commit/70a15ab))


### Features

* add file types/ to customize index.d.ts ([c537d81](https://github.com/alibaba-fusion/next/commit/c537d81))
* **Menu:** add API embeddable ([6d21bb1](https://github.com/alibaba-fusion/next/commit/6d21bb1))
* **Nav:** add API embeddable ([1379df3](https://github.com/alibaba-fusion/next/commit/1379df3))
* **Table:** add API sortIcons to customize sort icons ([7abcf7c](https://github.com/alibaba-fusion/next/commit/7abcf7c))
* **Select:** add api to customize show tag content ([4c29109](https://github.com/alibaba-fusion/next/commit/4c29109))
* **Select:** add maxTagPlaceholder ([bfc9b20](https://github.com/alibaba-fusion/next/commit/bfc9b20))


2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ import '@alifd/next/lib/button/style';
// ...
plugins: [
[
'babel-plugin-import',
'import',
{
libraryName: '@alifd/next',
style: true,
Expand Down
2 changes: 1 addition & 1 deletion README.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ babel 配置:
// ...
plugins: [
[
'babel-plugin-import',
'import',
{
libraryName: '@alifd/next',
style: true,
Expand Down
74 changes: 74 additions & 0 deletions docs/field/demo/topath-defaults.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# 结构化解析

- order: 12

使用 parseName 时设置默认值。
输入名称是 “值” 道具内的路径

:::lang=en-us
# Parse Array or Object

- order: 12

Set default values when using parseName.
Input name is path inside `values` prop

:::
---

````jsx
import {Input, Button, Field, Form } from '@alifd/next';



class Demo extends React.Component {
field = new Field(this, {
parseName: true,
values: {
aaa: ['xxx', 'yyy'],
bbb: {
ccc: 'value c'
}
}
});

_handleValidate = () => {
const {
field: {
validate
}
} = this;

validate(['bbb.ccc']);
};

render() {
const {
field,
field: {
init,
}
} = this;

console.log(this);

return (<Form field={field}>
<Button onClick={this._handleValidate}>validate</Button>
<Form.Item label="aaa" key="aaa">
<Input name="aaa.0"/>
</Form.Item>
<Form.Item label="ccc" key="ccc">
<Input name="bbb.ccc"/>
</Form.Item>
</Form>);
}
}

ReactDOM.render(<Demo/>, mountNode);
````

````css
.demo .next-btn {
margin-right: 5px;
}
````
13 changes: 6 additions & 7 deletions docs/number-picker/demo/accessibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,20 @@ class App extends React.Component {
if(value >= 0){
num = value;
}else {
num =`negative ${value * -1}`
num = `negative ${value * -1}`;
}
this.setState({
value: value,
tip:`${num}`,
tip: `${num}`,
});
}
render() {
const {value, tip} = this.state;
return (<div>
<span id="a11y-number-picker" aria-live="assertive" aria-label={tip}></span>
const { value, tip } = this.state;
return (<div>
<span id="a11y-number-picker" aria-live="assertive" aria-label={tip}></span>
<NumberPicker type="inline" value={value} onChange={this.onChange} upBtnProps={{'aria-label':'increasing button'}} downBtnProps={{'aria-label':'decreasing button'}} aria-labelledby="a11y-number-picker" />
</div>);
}
}
ReactDOM.render(<App/>, mountNode);

````
````
4 changes: 3 additions & 1 deletion docs/select/demo/multiple.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ class Demo extends React.Component{

ReactDOM.render(
<div>
<Select mode="multiple" onChange={handleChange} dataSource={dataSource} style={{width: 200}} />
<Select maxTagCount={2} maxTagPlaceholder={(cu, total) => `+${cu}`} mode="multiple" onChange={handleChange} dataSource={dataSource} style={{width: 200}} />
&nbsp;&nbsp;&nbsp;&nbsp;
<Select maxTagCount={2} mode="multiple" onChange={handleChange} dataSource={dataSource} style={{width: 200}} />
&nbsp;&nbsp;&nbsp;&nbsp;
<Select hasSelectAll mode="multiple" onChange={handleChange} dataSource={dataSource} style={{width: 200}} />
&nbsp;&nbsp;&nbsp;&nbsp;
Expand Down
6 changes: 4 additions & 2 deletions docs/select/index.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ This is because the layer's animation of the overlay is implemented by `classNam
|cacheValue | dataSource keeps the selected content | Boolean | true |
|valueRender | Methods for rendering Select to display content <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>** Parameters**:<br>_item_: {Object} Render node's item<br>**return value **:<br>{ReactNode} show content <br> | Function | item => item.label \|\| item.value |
| searchValue | Controlled search value, generally not set | String | - |
| maxTagTextLength | max length of each tag | Number | - |
| maxTagCount | max count of tag can be show | Number | - |
| maxTagPlaceholder | if selected tags' length is over maxTagCount, what to show <br><br>**签名**:<br>Function() => void | Function | (selected, total) => `${selected} / ${total}` |
| onRemove | tag Delete callback <br><br><br>**Signature**:<br>Function(item: object) => void<br>**Parameters**:<br>_item_: {object} Render node's Item | Function | func.noop |
| onFocus | focus event<br><br>**签名**:<br>Function() => void | Function | func.noop |
| onBlur | blur event<br><br>**签名**:<br>Function() => void | Function | func.noop |
Expand Down Expand Up @@ -153,5 +156,4 @@ This is because the layer's animation of the overlay is implemented by `classNam
| Down Arrow | Get the next item focus of the current item |
| Enter | Open the list or select current item |
| Esc | Close the list |



Loading

0 comments on commit 1a6480f

Please sign in to comment.