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

Range Fieldtype is not updated when switching sites in CP #4701

Closed
amurer opened this issue Nov 10, 2021 · 1 comment · Fixed by #4713
Closed

Range Fieldtype is not updated when switching sites in CP #4701

amurer opened this issue Nov 10, 2021 · 1 comment · Fixed by #4713

Comments

@amurer
Copy link

amurer commented Nov 10, 2021

Bug description

When having multiple sites with different content, the values of the range fields are not updated after switching the site in the CP.

How to reproduce

  • Create multiple sites
  • Create a blueprint with range fieldtypes
  • Add different content for each site
  • Switch between sites and check value of range fields

Logs

No response

Versions

Statamic CMS Pro 3.2.21
PHP 8

Installation

Fresh statamic/statamic site via CLI

Additional details

No response

@amurer
Copy link
Author

amurer commented Nov 10, 2021

To fix this add a watch method for the value property to:
https://github.com/statamic/cms/blob/3.2/resources/js/components/fieldtypes/RangeFieldtype.vue

watch: {
    value(value) {
        this.val = value;
    },

    val(value) {
        this.updateDebounced(value);
    }
}

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

Successfully merging a pull request may close this issue.

2 participants