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

Commit a8671fb

Browse files
Updating prop name from onCustomInit to just customInit
1 parent 463da92 commit a8671fb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎src/index.js‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ class SpatialNavigation extends Component {
3030
propsConfig.focusableClassName = this.props.focusableClassName;
3131
}
3232

33-
// React Custom: Set onCustomInit
34-
if (typeof this.props.onCustomInit === 'function') {
35-
propsConfig.onCustomInit = this.props.onCustomInit;
33+
// React Custom: Set customInit
34+
if (typeof this.props.customInit === 'function') {
35+
propsConfig.customInit = this.props.customInit;
3636
}
3737

3838
// Set defaultElement
@@ -98,13 +98,13 @@ class SpatialNavigation extends Component {
9898
}
9999

100100
componentDidMount() {
101-
if (!this.props.onCustomInit) {
101+
if (!this.props.customInit) {
102102
JsSpatialNavigation.init();
103103
JsSpatialNavigation.add(config);
104104
JsSpatialNavigation.focus();
105105

106106
} else {
107-
this.props.onCustomInit.call(this, config);
107+
this.props.customInit.call(this, config);
108108
}
109109
}
110110

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /