feat: update ASelect component to use defineEmits and improve props d…#159
Merged
maximeallanic merged 2 commits intomasterfrom May 23, 2025
Merged
feat: update ASelect component to use defineEmits and improve props d…#159maximeallanic merged 2 commits intomasterfrom
maximeallanic merged 2 commits intomasterfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates the ASelect component by refactoring the props definition to use the object-based defineProps API and introducing defineEmits for better event handling.
- Migrated from interface-based props to object-based with explicit type annotations and default values.
- Introduced a new property “hideSelected” and connected various event handlers via defineEmits.
Comments suppressed due to low confidence (2)
components/ASelect.vue:107
- [nitpick] Consider renaming the parameter 'opt' to 'option' for improved clarity and consistency in the event handler.
const onSelectOption = (opt: any) => emit('select', opt, props.name);
components/ASelect.vue:38
- [nitpick] Verify that the default color value 'grey-light' is intentional, as the previous version used 'grey-lighter'.
color: { type: String as PropType<Colors>, default: "grey-light" },
charlesbl
requested changes
May 23, 2025
…ndling in ASelect component
charlesbl
approved these changes
May 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request enhances the
ASelectcomponent by adding new event emitters, improving prop definitions, and introducing better customization options. The changes aim to make the component more flexible and easier to integrate into different use cases.Event Handling Enhancements:
update:modelValue,select,remove,search-change,tag,open,close) to improve interaction handling and provide more granular control over component behavior. [1] [2] [3] [4]Prop Improvements:
ASelectPropsto use explicitdefinePropswith type annotations, providing better type safety and default values for all props. Added a newhideSelectedprop for additional customization.Template Updates:
hideSelectedprop and attach the new event handlers for the corresponding component events. [1] [2]…efinition