Skip to content

Commit 49c065b

Browse files
committed
reactInput => reactShinyInput
1 parent 17b8994 commit 49c065b

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

inst/templates/input_js.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { reactInput } from 'reactR';
1+
import { reactShinyInput } from 'reactR';
22

33
const TextInput = ({ configuration, value, setValue }) => {
44
return <input type='text' value={value} onChange={e => setValue(e.target.value)}/>;
55
};
66

7-
reactInput('.${name}', '${package}.${name}', TextInput);
7+
reactShinyInput('.${name}', '${package}.${name}', TextInput);

srcjs/input.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import $ from 'jquery';
99
* the component will be re-rendered. Because receiveMessage is typically used
1010
* by input authors to perform incremental updates, this default implementation
1111
* can be overriden by the user with the receiveMessage arguments to
12-
* reactInput.
12+
* reactShinyInput.
1313
*/
1414
function defaultReceiveMessage(el, { configuration, value }) {
1515
let dirty = false;
@@ -45,7 +45,7 @@ const defaultOptions = {
4545
* the default. Typically overridden as an optimization to perform
4646
* incremental value updates.
4747
*/
48-
export function reactInput(selector,
48+
export function reactShinyInput(selector,
4949
name,
5050
component,
5151
options) {

srcjs/react-tools.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { reactWidget, hydrate } from './widget';
2-
import { reactInput } from './input';
2+
import { reactShinyInput } from './input';
33

44
window.reactR = {
5-
reactInput: reactInput,
5+
reactShinyInput: reactShinyInput,
66
reactWidget: reactWidget,
77
hydrate: hydrate
88
};

vignettes/intro_inputs.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ R side, we must create our own intermediate component that wraps one of
205205
Open `srcjs/colorpicker.jsx` and paste the following in:
206206

207207
```js
208-
import { reactInput } from 'reactR';
208+
import { reactShinyInput } from 'reactR';
209209
import { SketchPicker } from 'react-color';
210210

211211
const PickerInput = ({ configuration, value, setValue }) => {
@@ -217,7 +217,7 @@ const PickerInput = ({ configuration, value, setValue }) => {
217217
);
218218
};
219219

220-
reactInput('.colorpicker', 'colorpicker', PickerInput);
220+
reactShinyInput('.colorpicker', 'colorpicker', PickerInput);
221221
```
222222

223223
The above code creates a new [function

0 commit comments

Comments
 (0)