Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nouislider: fixed rendering in higher angular version #319

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Joostluijben
Copy link

The nouislider component was not rendering for me. After adding the source code found from here as a custom component and changing these lines it was rendering for me.

Screenshot from 2022-11-08 01-36-47

Using
angular version 18.3.9
node version: 16.8.1
typescript: 4.4.2
npm: 8.19.2

@Joostluijben Joostluijben changed the title Removed some lines and change the way of export to fix the nouislider rendering nouislider: fixed rendering in higher angular version Nov 8, 2022
@@ -123,8 +123,6 @@ function init(Survey) {
});
question.updateSliderProperties = function () {
const elems = document.getElementsByClassName("noUi-pips");
if (elems.length > 0) elems[elems.length - 1].style.display = "none";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to remove this (and below) line?

@@ -226,10 +224,4 @@ function init(Survey) {
},
};
Survey.CustomWidgetCollection.Instance.addCustomWidget(widget, "customtype");
}

if (typeof Survey !== "undefined") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we remove this call, custom widget will not be registered in non-modular applications

init(Survey);
}

export default init;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the "default" export cause problems with higher Angular versions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants