Select and TypeaheadSelect improvements#227
Open
gulcinuras wants to merge 16 commits intonext-releasefrom
Open
Select and TypeaheadSelect improvements#227gulcinuras wants to merge 16 commits intonext-releasefrom
Select and TypeaheadSelect improvements#227gulcinuras wants to merge 16 commits intonext-releasefrom
Conversation
- Add title as an interface prop and set type as ReactNode - Create an enum for Language options and use it in Select and TypeaheadSelect components
- Use contentRenderer as Select.Item content - Use contentRenderer for tag content as we removed the title prop - Instead of handling the keyword change inside TypeaheadSelect by filtering titles, handle it outside of the component
…d to set initial and changeable value
- Set canSelectMultiple to false if options.length is not bigger than 1
- Add testid to use in typeahead-select.test
- Add onClick optional prop to TypeheadSelectTrigger to set the correct classname when the menu is open
- setMenuVisibility to false if shouldCloseOnSelect is true, so that the classnames are correct
- Remove input styles when TypeaheadSelectInput is used inside of the trigger
- Add testid to TypeheadSelectTrigger to test it easily
- Fix most of the test cases for typeahead-select
- Fix classnames
- I used screen.findByText function to find the option but I can update it
Note:- In my opinion, having two classnames for typeahead-select and select is a bit unnecessary. We can just add typeahead-select as main classname and override select classnames if necessary.
- I couldn't fix a11y test case for the typeahead-select.
|
Contributor
|
I guess only the last two commits belongs to this PR |
edizcelik
reviewed
Feb 23, 2023
…he context state from the props with generateSelectState function
Anlerkan
approved these changes
Sep 18, 2023
Contributor
|
Let's update the PR title |
…ce we are handling the keyword state on our projects - controlledKeyword is the typeaheadProps.value with initial value - Update typeahead-select.test - Update stories
Select/TypeaheadSelect improvements
Select/TypeaheadSelect improvementsSelect and TypeaheadSelect improvements
jamcry
reviewed
May 13, 2024
Collaborator
There was a problem hiding this comment.
Let's try to follow this priority:
https://testing-library.com/docs/queries/about/#priority
| }: TypeheadSelectTriggerProps) { | ||
| return ( | ||
| <Select.Trigger customClassName={"typeahead-select-trigger"}> | ||
| <Select.Trigger customClassName={"typeahead-select-trigger"} onClick={onClick}> |
Collaborator
There was a problem hiding this comment.
Let's see why this was added and if it's necessary
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
props.optionsas initialoptionsvalue inselectOwnState, async options are not added in the options array. So, the asyncSelectItemhas an index value of -1 which is equal to thefocusedOptionIndex. That was why async items were highlighted unintentionally. -> resolves issue Select: Weird bug withoptionsstate #208Idtype forOptioninterface -> resolves issue Select: Type improvements #206