Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    BUG - Button can't be selected on creation when using radioGroup

    Hi,

    Here is a code showing the issue in showcase:
    Code:
    isc.Button.create({
              ID: "listingStyleButtonList",
              title: 'LIST',
              actionType: "radio",
              radioGroup: "listingStyle",
              selected: true,
                  left: 0,
            });
    
    isc.Button.create({
              ID: "listingStyleButtonTiles",
              title: 'TILES',
              actionType: "radio",
              radioGroup: "listingStyle",
              selected: false,
                  left: 150
            });
    I expect "LIST" button to be selected by default, but none of the buttons is selected.
    If I remove "listingStyle" radioGroup, button is created selected (though radio action is not working obviously)
    If I call select() after creation, the button is selected and works correctly afterwards.

    Best regards,
    Janusz

    #2
    I have noticed the code
    Code:
        // if this widget is selected, deselect it and mark it for redraw
        if (this.selected) {
            this.selected = false;
            this.markForRedraw();
        }
    that appeared in implementation of addToRadioGroup (I was updating system from some ancient 4-year old version, but with the same version number), however I can't find any mentions in docs regarding this behaviour.

    I believe former behaviour was better as it gave possibility to pre-select one button on creation.

    Best regards,
    Janusz

    Comment


      #3
      hi janusz ,

      Thanks for the report - we've fixed this issue for today's builds, dated September 29, and later ones.

      Comment

      Working...
      X