-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(comp:select): add 'overlay' to searchable #729
Conversation
This preview will be available after the AzureCI is passed. |
Codecov Report
@@ Coverage Diff @@
## main #729 +/- ##
==========================================
- Coverage 85.46% 85.46% -0.01%
==========================================
Files 420 421 +1
Lines 10673 10688 +15
Branches 2507 2516 +9
==========================================
+ Hits 9122 9134 +12
- Misses 1551 1554 +3
Continue to review full report at Codecov.
|
const labelRender = rawOption.customLabel ?? 'optionLabel' | ||
const labelSlot = isString(labelRender) ? slots[labelRender] : labelRender | ||
|
||
return slots.label?.(rawOption) ?? labelSlot?.(rawOption) ?? label |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return slots.label?.(rawOption) ?? labelSlot?.(rawOption) ?? label | |
return labelSlot? labelSlot(rawOption) : label |
if (isMax) { | ||
labelNode = slots.maxLabel?.(item.value) ?? label | ||
} else { | ||
labelNode = slots.label?.(item.rawOption) ?? rawOption.slots?.default?.() ?? label | ||
labelNode = slots.label?.(rawOption) ?? renderOptionLabel(slots, rawOption, label) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
labelNode = slots.label?.(rawOption) ?? renderOptionLabel(slots, rawOption, label) | |
labelNode = slots.label ? slots.label(rawOption) : renderOptionLabel(slots, rawOption, label) |
cc8923a
to
be59d57
Compare
input is now rendered within overlay when searchable is 'overlay' fix(comp:selectable): fix selected options render when using IxOption refactor(comp:selectable): replace slot label with selectedLabel replace slot maxLabel with overflowedLabel
be59d57
to
d3a6dfe
Compare
input is now rendered within overlay when searchable is 'overlay'
fix(comp:selectable): fix selected options render when using IxSelectOption
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
What is the new behavior?
Other information
抽离label渲染的工具函数 renderOptionLabel