In plugins/rainlab/location/models/country/scopes.yaml, the conditions array for the enabled switch scope is reversed:
enabled:
label: Enabled
type: switch
conditions:
- is_enabled = '1' # applied when switch is OFF (indeterminate)
- is_enabled = '0' # applied when switch is ON (checked)
According to the switch scope documentation, the first condition applies to the indeterminate (off) state and the second to the checked (on) state. The current order causes the filter to show disabled countries when the switch is turned on, and enabled countries when it is turned off.
Footnote - wouldn't it actually be better if it went ON on the first click and OFF on the second? But it's a huge breaking change...
In
plugins/rainlab/location/models/country/scopes.yaml, the conditions array for the enabled switch scope is reversed:According to the switch scope documentation, the first condition applies to the indeterminate (off) state and the second to the checked (on) state. The current order causes the filter to show disabled countries when the switch is turned on, and enabled countries when it is turned off.
Footnote - wouldn't it actually be better if it went ON on the first click and OFF on the second? But it's a huge breaking change...