FtRadioButton and FtCheckboxList v-model and composition API #6463
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
FtRadioButton and FtCheckboxList v-model and composition API
Pull Request Type
Related issue
Description
This pull request migrates the FtRadioButton and FtCheckboxList components to the composition API and implements the component v-model system for them. The component v-model setup allows us to get rid of the dodgy watching properties on the refs and calling methods on them setup that we previously had, simplifying it to just refs and watchers. This avoids extra component updates as now only those who's data actually changed get updated/re-rendered and we also only make calls to the store for values that actually changed.
Hopefully this improves the performance, if not then at least we've migrated two more components to the composition API and still have less complicated code in the FtSearchFilters component.
In Vue 3.4 the Vue developers introduced the
defineModel()
compiler macro which takes away the boilerplate of the component v-model implementation, so we'll be able to simplify the code even further when we update to Vue 3. The backport of the compositon API into Vue 2.7 happened well before the Vue 3.4 release, so we don't have access to the macro in Vue 2.7.Testing
Test that the search filters still work correctly.
@efb4f5ff-1298-471a-8973-3d47447115dc Please also test that this improves the performance of the search filters.
Desktop