Create Doesn't Render
See original GitHub issueI have installed both nouislider
and @types/nouislider
into my project using:
npm install --save-dev nouislider
npm install --save-dev @types/nouislider
I have a <div>
at the top of my page for the noUiSlider
<div class="noUiSlider" id="slider"></div>
Since I’m using webpack
I also added the following to plugins
within the webpack.config.js
file:
new webpack.ProvidePlugin({
noUiSlider: 'nouislider'
})
Within the TypeScript
file, I use the import
import * as noUiSlider from 'nouislider';
And within the $(document).ready(function() {}
function, I create the noUiSlider
with
var slider = document.getElementById('slider');
if (slider) {
noUiSlider.create(slider, {
start: [20, 80],
connect: true,
range: {
'min': 0,
'max': 100
}
});
}
Nothing is displayed within the HTML, however when I inspect the element I get
<div id="slider" class="noUiSlider noUi-target noUi-ltr noUi-horizontal">
<div class="noUi-base">
<div class="noUi-connects">
<div class="noUi-connect" style="transform: translate(20%, 0px) scale(0.6, 1);"></div>
</div>
<div class="noUi-origin" style="transform: translate(20%, 0px); z-index: 5;">
<div class="noUi-handle noUi-handle-lower" data-handle="0" tabindex="0" role="slider" aria-orientation="horizontal" aria-valuemin="0.0" aria-valuemax="80.0" aria-valuenow="20.0" aria-valuetext="20.00"></div>
</div>
<div class="noUi-origin" style="transform: translate(80%, 0px); z-index: 4;">
<div class="noUi-handle noUi-handle-upper" data-handle="1" tabindex="0" role="slider" aria-orientation="horizontal" aria-valuemin="20.0" aria-valuemax="100.0" aria-valuenow="80.0" aria-valuetext="80.00"></div>
</div>
</div>
</div>
What would be causing the element to not appear correctly?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Create React App build doesn't render all elements [closed]
Issue. I seems you've set the opacity to a really low value and the questions div is nearly invisible. #questions.visible { left: 0; ......
Read more >ReactDOM does not render the app after build and only on ...
The problem is that when I try to serve the build folder, the first time I try to load the app in the...
Read more >REACT – Simple Intro Component Not Rendering?
There are two main ways to use React. First, install and set it up locally, probably through create-react-app . Second, through a CDN....
Read more >React's render() Doesn't... Render - DEV Community
Just to be clear, rerender in this context means calling render for all components, it doesn't mean React will unmount and remount them....
Read more >ReactDOM – React
render () controls the contents of the container node you pass in. Any existing DOM elements inside are replaced when first called. Later...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Is the CSS included?
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.