Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions lib/assets/javascripts/react_ujs.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,14 +422,12 @@ module.exports = {
module.exports = {
// Turbolinks 5+ got rid of named events (?!)
setup: function(ujs) {
ujs.handleEvent('DOMContentLoaded', ujs.handleMount)
ujs.handleEvent('turbolinks:render', ujs.handleMount)
ujs.handleEvent('turbolinks:load', ujs.handleMount)
ujs.handleEvent('turbolinks:before-render', ujs.handleUnmount)
},

teardown: function(ujs) {
ujs.removeEvent('DOMContentLoaded', ujs.handleMount)
ujs.removeEvent('turbolinks:render', ujs.handleMount)
ujs.removeEvent('turbolinks:load', ujs.handleMount)
ujs.removeEvent('turbolinks:before-render', ujs.handleUnmount)
},
}
Expand Down
2 changes: 1 addition & 1 deletion lib/react/rails/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ module React
module Rails
# If you change this, make sure to update VERSIONS.md
# and republish the UJS by updating package.json and `bundle exec rake ujs:publish`
VERSION = '2.4.3'
VERSION = '2.4.4.pre'
end
end
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react_ujs",
"version": "2.4.3",
"version": "2.4.4-PRE",
"description": "Rails UJS for the react-rails gem",
"main": "react_ujs/index.js",
"files": [
Expand All @@ -12,8 +12,5 @@
},
"devDependencies": {
"webpack": "^2.3.3"
},
"dependencies": {
"react_ujs": "^2.4.3"
}
}
6 changes: 2 additions & 4 deletions react_ujs/dist/react_ujs.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,14 +422,12 @@ module.exports = {
module.exports = {
// Turbolinks 5+ got rid of named events (?!)
setup: function(ujs) {
ujs.handleEvent('DOMContentLoaded', ujs.handleMount)
ujs.handleEvent('turbolinks:render', ujs.handleMount)
ujs.handleEvent('turbolinks:load', ujs.handleMount)
ujs.handleEvent('turbolinks:before-render', ujs.handleUnmount)
},

teardown: function(ujs) {
ujs.removeEvent('DOMContentLoaded', ujs.handleMount)
ujs.removeEvent('turbolinks:render', ujs.handleMount)
ujs.removeEvent('turbolinks:load', ujs.handleMount)
ujs.removeEvent('turbolinks:before-render', ujs.handleUnmount)
},
}
Expand Down
6 changes: 2 additions & 4 deletions react_ujs/src/events/turbolinks.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
module.exports = {
// Turbolinks 5+ got rid of named events (?!)
setup: function(ujs) {
ujs.handleEvent('DOMContentLoaded', ujs.handleMount)
ujs.handleEvent('turbolinks:render', ujs.handleMount)
ujs.handleEvent('turbolinks:load', ujs.handleMount)
ujs.handleEvent('turbolinks:before-render', ujs.handleUnmount)
},

teardown: function(ujs) {
ujs.removeEvent('DOMContentLoaded', ujs.handleMount)
ujs.removeEvent('turbolinks:render', ujs.handleMount)
ujs.removeEvent('turbolinks:load', ujs.handleMount)
ujs.removeEvent('turbolinks:before-render', ujs.handleUnmount)
},
}
6 changes: 0 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1314,12 +1314,6 @@ rc@^1.1.7:
minimist "^1.2.0"
strip-json-comments "~2.0.1"

react_ujs@^2.4.2, react_ujs@^2.4.3:
version "2.4.3"
resolved "https://registry.yarnpkg.com/react_ujs/-/react_ujs-2.4.3.tgz#f35b641f248a155ad3539468c5463734fce4fe4a"
dependencies:
react_ujs "^2.4.2"

read-pkg-up@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02"
Expand Down