Skip to content

ROS-494: Add ability to display custom text inside OXD treeselect input for the selected values#883

Open
inmoh7 wants to merge 4 commits intoorangehrm:entfrom
inmoh7:treeselect-all-text-display
Open

ROS-494: Add ability to display custom text inside OXD treeselect input for the selected values#883
inmoh7 wants to merge 4 commits intoorangehrm:entfrom
inmoh7:treeselect-all-text-display

Conversation

@inmoh7
Copy link

@inmoh7 inmoh7 commented Feb 16, 2026

Checklist

  • Test Coverage is 100% for the newly added code
  • Storybook stories are added/updated for the changed areas
  • Components standards defined in this document are followed
  • Code is linted properly
  • Developer testing is done for the affected areas
  • Package version updated (not applicable to ent branch)
  • Changelog.md updated on possible breaking (applicable to ent branch)

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 pull request adds a new feature to the TreeSelect component that allows displaying "All" as the input value when all options are selected, controlled by a new showAllWhenAllSelected prop. The feature includes proper test coverage and Storybook documentation.

Changes:

  • Added showAllWhenAllSelected boolean prop to TreeSelect component with default value false
  • Modified the display logic to show "All" when the prop is enabled and all options are selected
  • Updated the count chip visibility logic to hide it when showing "All"
  • Added comprehensive test coverage for the new functionality

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
components/src/core/components/Input/TreeSelect/TreeSelect.vue Added new prop and updated display value logic to show "All" when appropriate, modified count chip visibility condition
components/src/core/components/Input/tests/treeselect.spec.ts Added comprehensive test suite for the new showAllWhenAllSelected functionality including edge cases
storybook/stories/core/components/treeSelect/TreeSelectShowAll.story.vue New Storybook story demonstrating the "Show All" feature
storybook/stories/core/components/treeSelect/TreeSelect.stories.js Added story export for the new ShowAll example
changelog.md Documented the new feature in the changelog

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@inmoh7 inmoh7 force-pushed the treeselect-all-text-display branch from 06a0760 to 8a12378 Compare February 16, 2026 06:57
@inmoh7 inmoh7 changed the title ROS-494 : Allow show "All" when all the options are selected in the Tree-select input ROS-494 : Allow show a custom text as the value when all the options are selected in the Tree-select input Feb 16, 2026
return {args};
},
components: {TreeSelectShowAll},
template: `<TreeSelectShowAll/>`,
Copy link
Member

Choose a reason for hiding this comment

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

Check the story documentation when viewed from docs mode it should show the code that can be copied to get the output of story. Check below example.

Image

type: String,
default: '',
validator: function(value: string) {
return value.length <= 100;
Copy link
Member

Choose a reason for hiding this comment

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

Would it be better to truncate this within the component rather adding a limitation here. Prop errors are sometime missed

:value="
getPlaceholderValue() + (selectedIdsLengthComputed > 1 ? ',' : '')
"
:value="allSelectedText && isAllSelected ? allSelectedText : displayValue"
Copy link
Member

Choose a reason for hiding this comment

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

Since we have a computed property for displayvalue. can we do all the condition and checks within it? that would be more efficent

@Super-Chama Super-Chama changed the title ROS-494 : Allow show a custom text as the value when all the options are selected in the Tree-select input ROS-494: Add ability to display custom text inside OXD treeselect input for the selected values Feb 17, 2026
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.

2 participants