Skip to content

Commit

Permalink
fix: modify tag delete both at the same time
Browse files Browse the repository at this point in the history
* chore(DatePicker): Optimization code.

* doc(DatePicker): Update document api.

* released v1.9.1

* Update changelog.

* Upgrade webpack to v4

* feat(Carousel): Update react-slick v0.23.1

* style(Carousel): Update styles.

* doc(Carousel): Update Example.

* test(Modal): Update test case.

* test(Select): Update test case.

* style(InputNumber): Modify icon style.

* released v1.9.2

* chore: Update deploy commit.

* feat(Checkbox.Group): onChange enhancements.

* released v1.9.2

* doc: Update changelog.

* chore: Minimizer css.

* feat(Select): Add onSearch & loading props.

* Update changelog v1.9.4

* released v1.9.4

* Update deploy command.

* fix(Input): Fix placeholder props issue.

* fix(Select): Fix placeholder props issue.

* released v1.9.5

* Update hotkeys-js@3.3.1

* Update webpack devDependencies.

* fix(Select): Fix remote search selected issue.

* released v1.9.6

* fix(Select): Fix onSearch props issue.

* released v1.9.7

* doc: Update recommendation.

* fix(Tabs): The component will receive props children & activeKey fail.

* released v1.9.8

* fix(Tabs): The component will receive the props activeKey style issue.

* released v1.9.9

* fix(Tabs): Style issue with no activeKey.

* Update changelog v1.10.0

* style(Form): Update form component style alignment.

* fix(Tabel): fix props _checked issue.

* released v1.11.0

* fix(Select): fix issue with remove search get value.

* released v1.11.1

* feat(Select): Add onClear props.

* released v1.11.2

* fix(TimePicker): Fix an input error time trigger an event fail.

* released v1.11.3

* released v1.11.4, Without any updates.

* feat(Loading): Add reset props.

* released v1.11.5

* Update changelog v1.11.5

* style(Loading): Modify Loading componnent styles.

* released v1.116

* style(Message): Modify style z-index.

* released v1.11.7

* style(Form): Inline style modify.

* released v1.11.8

* feat(Card): Optimization code & Modify header and footer style.

* released v1.12.0

* Update package.json

* Update changelog uiw@1.12.1

* fix(Tabs): Fix data change check effect issue.

* released v1.12.2

* Update changelog uiw@1.12.2

* style(Tabs): Modify the close button style.

* fix(Select): Fix value props issue.

* released v1.11.3

* style(Breadcrumb): Modify the icon style.

* relased v1.12.4

* fix(Select): Null value, empty selected state.

* feat(Capsule): Add Capsule component.

* released v1.12.4

* feat(Select): Children option change value.

* released v1.13.1

* feat(Checkbox): Props option add label.

* doc(Checkbox): Update document.

* released v1.13.2

* Update changelog uiw@v1.13.2

* fix(Checkbox): Enhance props.

* released v1.13.3

* fix(CheckBox): The onChange return an incorrect value.

* released v1.13.4

* feat(Modal): The param title is an empty hidden title.

* feat: Add release command.

* doc: Update changelog

* released v1.13.5

* chore: Update start command.

* chore(Modal): Optimize animation display.

* chore: Modify start command error.

* released v1.13.6

* Fix(Modal): Fix scrolling issue.

* released v1.13.7

* chore: Fix start command error.

* style(Tag): Modify line height.

* style(Button): Modify button line height style.

* released v1.13.8

* doc(Select): Add example.

* test(Input & Switch): Update test case.

* chore(Modal): Add PropTypes prefixCls.

* chore: Update dependencies.

* released v1.13.9

* chore(Tag): Modify spacing style.

* released v1.13.10

* style(Button): Modify Button disabled style.

* chore(Icon): Add example.

* chore: Update dependencies gh-pages@1.2.0

* released v1.13.11

* chore: Modify the URL display in the command line.

* style(CopyToClipboard): Modify cursor style.

* released v1.13.12

* chore: Update development command.

* style(Form): Modify line height.

* test: Update test command.

* test: Update travis config.

* test: Update travis config.

* test: Update .travis.yml

* test: Update test command.

* test: Update jest config.

* test: Formatting code.

* doc: Update quick start document.

* chore: Update devDependencies.

* test(Switch): Update test case.

* test(Switch): Update Test onChange event.

* test(Input & Switch): Update test case.

* test(Input & Timestamp): Update test case.

* test(Switch): Add test case.

* fix(Timestamp): Receive props issue.

* released v1.13.13

* fix(Timestamp): Receive props value issue.

* release v1.13.14

* released v1.13.15

* fix(Timestamp): Receive props issue.

* released v1.13.16

* chore(Form): Parameter does not exist label does not show.

* Update changelog uiw@1.13.17

* released v1.13.17

* test: Update .travis.yml

* style(Form): Modify column styles.

* released v1.13.18

* styles(Layout): Modify screen mini width styles.

* released v1.13.19

* feat(Card): Add props bodyClassName.

* released v1.13.20

* chore(Icon): Update the size of all icon borders.

* released v1.13.21

* feat(Tabs): Add tabBarExtra prameter.

* feat(Tabs): Add onTabAdd props.

* released v1.14.0

* Update uiw-iconfont@1.2.11

* released v1.14.1

* fix(Tabs): Fix onTabAdd issue.

* released v1.14.2

* style(Button): Modify the spacing between buttons.

* released v1.14.3

* styles(Button): Modify the spacing between button groups and buttons.

* released v1.14.4

* style(Table): Modify table td style.

* released v1.14.5

* style(Button): Modify small size button.

* released v1.14.6

* fix(Innput): Remove redundant apis.

* doc(Input): Update document.

* released v1.14.7

* style: Adjust icon alignment style.

* released v1.14.8

* Update .travis.yml

* Add jest badge.

* fix(Alert): Add PropTypes node.

* released v1.14.9

* style(Collapse): Modify border radius.

* feat(Transition): Add animation.

* feat(Modal): Add drag and drop.

* released v1.14.10

* doc: Update changelog v1.14.10

* doc(Modal): Update document.

* feat(Modal):提交尺寸改变属性

* released v1.14.11

* Update uiw-iconfont@1.2.13

* released v1.14.12

* style(Alert): Modify description word break.

* released v1.14.13

* feat(Table): Add showHeader props.

* released v1.15.0

* fix(Table): fix showHeader issue.

* doc(Form): Add expample.

* chore(Select): Optimize the filterable parameters.

* released v1.15.2

* Fix button style issue in Safari.

* released v1.15.3

* Fix(Form): Fix field props issues.

* released v1.15.4

* style(Form): Modify vertical layout styles.

* released v1.15.5

* Update Form document.

* feat(Menu): Add inlineIndent props.

* released v1.15.6

* style(Input): Modify Input border styles.

* released v1.15.7

* Add type props.

* released v1.15.8

* style(Input): Modify Input styles.

* released v1.15.9

* refactor(Tooltip): Increase judgment

* Fix(Select) fix multi-select box height issue.

* released v1.15.10

* chore: Fix  build command errors.

* Upgrade to Babel 7.

* #64 Jest compatible with babel7.

* refactor(Breadcrumb): Optimization code.

* released v1.16.0

* doc: Update changelog v1.16.0

* doc: Fix document compilation error issue.

* Update marked@0.5.0

* chore: Update webpack config.

* chore: Add webpack pluginn.

* Fix: Fix .babelrc config causes package issue.

* chore: Modify the lib build command.

* released v1.16.1

* style(Input): Modify input style.

* released v1.16.2

* style(Input): Modify the Input disable style.

* released v1.16.3

* Update jest dependencies.

* Fix running test error. #64

* Fix will receive value props.

* released v1.16.4

* chore: Update the dependencies uiw-iconfont.

* Released 1.16.5

* Fix(Icon): Fix icon font error.

* released v1.16.6

* fix(Icon): Modify the icon font file name.

* released v1.16.7

* feat(Radio): Add Group Radio styles.

* released v1.16.8

* released v1.16.9 & Update dependencies.

* fix(Radio): Fix onChange return value error.

* released v1.16.10

* feat(Radio): Value supports more types.

* released v1.16.11

* released v1.16.12, rebuild

* Update npm ignore

* Modify webpack config.

* released v1.16.13

* Update README.md

* released v1.16.14

* fix(Tabs): fix componentUnWillMount isssue.

* fix(Tabs): fix componentUnWillMount isssue.

* fix(website): Fix url errors.

* fix(website): Fix url errors.

* fix: modify tag delete both at the same time
  • Loading branch information
wangchuxi authored and jaywcjlove committed Mar 2, 2019
1 parent 186a90c commit b1a3400
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/tag/Tag.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,11 @@ import './style/index.less';
export default class Tag extends Component {
constructor(props) {
super(props);
this.state = {
visible: true,
};
this.state = {};
}
close = (e) => {
const { onClose, children } = this.props;
if (onClose) onClose(e, children);
if (e.isDefaultPrevented()) return;
this.setState({
visible: false,
});
}

isColorValue(color) {
Expand All @@ -30,7 +24,6 @@ export default class Tag extends Component {
}
render() {
const { prefixCls, color, onClose, className, checked, children, data, ...others } = this.props;
const { visible } = this.state;
let colors = '';
switch (color) {
case 'default': colors = 'white'; break;
Expand All @@ -51,7 +44,7 @@ export default class Tag extends Component {
styles.backgroundColor = colors;
}

return visible ? (
return (
<span {...others} style={styles} className={cls}>
{children}
{(onClose && checked !== true && checked !== false) &&
Expand All @@ -63,7 +56,7 @@ export default class Tag extends Component {
/>
}
</span>
) : null;
);
}
}

Expand Down

0 comments on commit b1a3400

Please sign in to comment.