Skip to content

Conversation

@maximeallanic
Copy link
Member

@maximeallanic maximeallanic commented May 22, 2025

This pull request enhances the ASelect component 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:

  • Added new event emitters (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:

  • Refactored ASelectProps to use explicit defineProps with type annotations, providing better type safety and default values for all props. Added a new hideSelected prop for additional customization.

Template Updates:

  • Updated the template to bind the new hideSelected prop and attach the new event handlers for the corresponding component events. [1] [2]…efinition

@maximeallanic maximeallanic requested a review from Copilot May 22, 2025 15:22
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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" },

@maximeallanic maximeallanic requested a review from charlesbl May 23, 2025 11:05
@maximeallanic maximeallanic merged commit 387a28b into master May 23, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants