sfirke commented on code in PR #45591:
URL: https://github.com/apache/superset/pull/45591#discussion_r4360731210
##########
superset-frontend/packages/superset-ui-core/src/components/Select/AsyncSelect.test.tsx:
##########
@@ -1681,6 +1681,42 @@ test('onChange is called with the value property when
pasting an option that was
);
});
+test('pasting matches the title of options with a React label', async () => {
Review Comment:
Good catch, thanks. You're right: with `totalCount` equal to the page
length, `allValuesLoaded` is true and the fetch is never reached. I added
`pasting matches the title of a React-label option that was not loaded yet`.
Its first page returns only Jane with `totalCount: 2`, and the search for `Bob
Jones` returns Bob, so the match has to come from the fetched page. It asserts
`onChange` gets value 2 and that the search request was made. I checked it the
way you described: with the fetched-page lookup reverted to `item.label ===
text`, this test fails while the other paste tests still pass.
---
🤖 _Drafted by Claude Code, reviewed and approved by @sfirke._
--
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]