0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00
Independent technology for modern publishing, memberships, subscriptions and newsletters.
Find a file
Kevin Ansfield c24bd50f10 Refactored <GhMembersRecipientSelect> to auto-update on @filter change
no issue

- we want to re-use this component as display-only on the email newsletter settings screen but the previous component design meant that changes to the `@filter` argument did not update the display
- moved to using getters for the internal base/specific filter Set instances so they are auto-updated when the `args.filter` param changes
- updated the `toggleSpecificFilter` action to store the current specific filter as temporary internal state when toggled off so it can be re-filled when toggling back on
  - this interaction was why the component state had previously been disconnected from the `@filter` param
- moved filter string generation into an explicit `updateFilter` method that is called when any action occurs that should update the filter string. Changes to the filters are passed in as arguments so that we call the passed in action which will then update the `@filter` argument and the component state can react accordingly
2022-01-19 14:29:49 +00:00
ghost/admin Refactored <GhMembersRecipientSelect> to auto-update on @filter change 2022-01-19 14:29:49 +00:00