1. 28 Mar, 2022 1 commit
    • Lukas 'Eipi' Eipert's avatar
      Fix project permission toggle behavior · eda15b06
      Lukas 'Eipi' Eipert authored
      Problem:
      
      ```
      Given that you are on public project
      When you disable a permission
        And enable it again
      Then the dropdown shows that you selected the last value on the list
      While the internal input has another value set.
      ```
      
      This has to do with a quirky behavior where we replace the `value` and
      the `options` provided to the `<select>` inside of the
      ProjectFeatureSettings input component. Internally we used the
      `selected` attribute of the `<option>` elements to track which option
      was selected. That attribute is just for initial rendering though:
      
      > If present, this Boolean attribute indicates that the option is
      > initially selected. If the `<option>` element is the descendant of a
      > `<select>` element whose multiple attribute is not set, only one
      > single `<option>` of this `<select>` element may have the selected
      > attribute.
      
      This seems to be non-problematic if one never changes the options that
      are availabe for the specific select.
      
      The solution for this is to create a computed property with a getter and
      setter and use that computed property as a v-model for the internal
      select.
      
      Changelog: fixed
      eda15b06
  2. 24 Mar, 2022 39 commits