bito-code-review[bot] commented on code in PR #40984:
URL: https://github.com/apache/superset/pull/40984#discussion_r3399306426
##########
superset-frontend/packages/superset-ui-core/src/components/Select/Select.tsx:
##########
@@ -690,7 +690,9 @@ const Select = forwardRef(
}
} else {
const token = tokenSeparators.find(token =>
pastedText.includes(token));
- const array = token ? uniq(pastedText.split(token)) : [pastedText];
+ const array = token
+ ? uniq(pastedText.split(token).map(s => s.trim()).filter(Boolean))
+ : [pastedText.trim()].filter(Boolean);
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Paste handling inconsistency</b></div>
<div id="fix">
The paste handler in `Select.tsx` now trims whitespace and filters empty
strings from token-separated values, but `AsyncSelect.tsx` (line 673) retains
the original unprocessed split logic. This inconsistency means users pasting
identical text into these two components receive different tokenization
results. Align `AsyncSelect.tsx` with the corrected behavior in `Select.tsx`.
</div>
</div>
<small><i>Code Review Run #5cfb3b</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]