Survey-library: iCheck and 'other' feature

Created on 3 Jul 2017  路  11Comments  路  Source: surveyjs/survey-library

Are you requesting a feature, reporting a bug or ask a question?

Bug

What is the current behavior?

I setup question type 'matrix' and 'radiogroup' with iCheck.
When select the Column 1 or Column 2 in each row it load a question type 'radiogroup' with other option. But in the initial load of the 'radiogroup' when click the other option it didn't show the input text field.

What is the expected behavior?

Each and every time when we click the other option it need to show the input text field.

How would you reproduce the current behavior (if this is a bug)?

Click the other option in the question type 'radiogroup' in initial load.

Provide the test code and the tested page URL (if applicable)

Tested page URL: Demo

```

Specify your

  • browser: Google Chrome
  • browser version: Version 59.0.3071.115 (Official Build) (64-bit)
  • surveyjs platform (angular or react or jquery or knockout or vue): jQuery
  • surveyjs version: Latest
bug fixed

All 11 comments

@nithinM hello! Thanks for your interest and for the plnkr demo :) I'll take a look at it.

@nithinM I've fixed the problem by adding this code: question.customWidgetData.isNeedRender = true; and I've updated your example:

https://plnkr.co/edit/bzVvBMcbBPfFdDhsq0Or?p=preview

Could you check it please?

@dmitrykurmanov It's working now. Thank you so much. Is there way to check those configurable option? I never see it in the documentation.

@nithinM this is the workaround. And it works only for react/jQuery/angular platforms. I'll try to understand this iCheck behavior and fix it. And if I can't do it we think about include this trick in the docs.

@dmitrykurmanov I got your point, but it really cool to know those hacks in case. Really appreciate your help.

@nithinM yes we think about "just render the whole question, bro" feature as a workaround for difficult cases :)

ko: https://plnkr.co/edit/J2fKY5etTgJH22VJGRAC?p=preview

    ... var cb = question.valueChangedCallback;
    question.valueChangedCallback = function() {
        cb();
        select();
    } ...

vue: https://plnkr.co/edit/JCBoyZyKgALojy0Q1WrU?p=preview
just add other markup into template

Hi @dmitrykurmanov , I noticed another issue in iCheck as custom widget. Check this URL please Preview

In the 3rd question set used checkbox but it not allow to select multiple options. What can be the reason for it?

@nithinM, hello! I've created an example: https://plnkr.co/edit/BUTWvvDYmqME5UFlShbe?p=preview, could your check it please?

@dmitrykurmanov, It works like a charm, Thank you!

@nithinM, it is a little bit tricky and we think about hidden all of this code and provide possibility to just include another question type for example "iCheckRadioGroup" and use it like simple question.

Was this page helpful?
0 / 5 - 0 ratings