Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4b141e6

Browse files
committed
fix(tags): add tag modal not displaying create tag modal
1 parentf62045a commit4b141e6

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

‎src/client/containers/Modals/AddTagsModal.jsx‎

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import PropTypes from 'prop-types'
1616
import{connect}from'react-redux'
1717

1818
import{getTagsWithPage}from'actions/tickets'
19+
import{showModal,hideModal}from'actions/common'
1920

2021
importBaseModalfrom'containers/Modals/BaseModal'
2122
importButtonfrom'components/Button'
@@ -39,6 +40,14 @@ class AddTagsModal extends React.Component {
3940
$(this.select).trigger('chosen:updated')
4041
}
4142

43+
onCreateTagClicked(e){
44+
e.preventDefault()
45+
this.props.hideModal()
46+
setTimeout(()=>{
47+
this.props.showModal('CREATE_TAG')
48+
},300)
49+
}
50+
4251
onSubmit(e){
4352
e.preventDefault()
4453
letselectedTags=$(e.target.tags).val()
@@ -108,7 +117,7 @@ class AddTagsModal extends React.Component {
108117
</option>
109118
))}
110119
</select>
111-
<buttontype='button'style={{borderRadius:0}}>
120+
<buttontype='button'style={{borderRadius:0}}onClick={e=>this.onCreateTagClicked(e)}>
112121
<iclassName='material-icons'style={{marginRight:0}}>
113122
add
114123
</i>
@@ -151,12 +160,14 @@ AddTagsModal.propTypes = {
151160
currentTags:PropTypes.array,
152161
tagsSettings:PropTypes.object.isRequired,
153162
getTagsWithPage:PropTypes.func.isRequired,
154-
socket:PropTypes.object.isRequired
163+
socket:PropTypes.object.isRequired,
164+
showModal:PropTypes.func.isRequired,
165+
hideModal:PropTypes.func.isRequired
155166
}
156167

157168
constmapStateToProps=state=>({
158169
tagsSettings:state.tagsSettings,
159170
socket:state.shared.socket
160171
})
161172

162-
exportdefaultconnect(mapStateToProps,{ getTagsWithPage})(AddTagsModal)
173+
exportdefaultconnect(mapStateToProps,{ getTagsWithPage, showModal, hideModal})(AddTagsModal)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp