jqwidgets-scripts-custom
Version:
jQWidgets is an advanced jQuery, Angular 7, Vue, React, ASP .NET MVC, Custom Elements and HTML5 UI framework.
28 lines (24 loc) • 812 B
JavaScript
import React from 'react';
import ReactDOM from 'react-dom';
import JqxRating from '../../../jqwidgets-react/react_jqxrating.js';
class App extends React.Component {
componentDidMount() {
this.refs.myRating.on('change', (event) => {
document.getElementById('rate').innerHTML = ' ' + event.value;
});
}
render () {
return (
<div>
<JqxRating ref='myRating'
width={350} height={35} theme={'classic'}
/>
<div style={{ marginTop: 10 }}>
<div style={{ float: 'left' }}>Rating:</div>
<div id='rate'/>
</div>
</div>
)
}
}
ReactDOM.render(<App />, document.getElementById('app'));