-
Notifications
You must be signed in to change notification settings - Fork 2
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
✨(react) add async mode to Select #305
base: main
Are you sure you want to change the base?
Commits on Sep 24, 2024
-
✨(react) introduce mono async searchable select
Add *.tool-versions to .gitignore Add a test asserting that a mono uncontrolled searchable select can work with an async callback given as an options prop. Add types for the callback provided as an options prop for the Form/Select component Add Searchable Uncontrolled With Async Options Fetching and Searchable Uncontrolled With Async Options Fetching And Default Value stories in storybook. Change SelectMono so that only an array of options is passed to SelectMonoSimple since options prop of SelectMono may also be a callback to pass to SelectMonoSearchable. This new feature allow to pass an async callback as options prop for a Searchable Mono Select component. Give it a function to fetch dynamically data from a third service and format them into an array of options. A context param is automatically passed to the callback so that the function is able to filter tha data according to the search string. If the props.defaultValue is provided, then the Select will pick a default option matching the default value.
Configuration menu - View commit details
-
Copy full SHA for 457d922 - Browse repository at this point
Copy the full SHA 457d922View commit details -
⚡️(react) prevent unecessary async options fetching
Prevents useless triggering of async options fetching due to default value and inputFilter updates handling in mono-searchable.ts.
Configuration menu - View commit details
-
Copy full SHA for cd38f69 - Browse repository at this point
Copy the full SHA cd38f69View commit details -
✅(react) update test for select with async options fetching
updates Mono.spec tests according to improvement related with async data fetching callback preventing useless execution.
Configuration menu - View commit details
-
Copy full SHA for c795bd5 - Browse repository at this point
Copy the full SHA c795bd5View commit details -
✨(react) add use of loader in mono searchable select
Add style for the loader of Select component when it uses async options callback fetching.
Configuration menu - View commit details
-
Copy full SHA for c876a16 - Browse repository at this point
Copy the full SHA c876a16View commit details -
✅(react) add test for searchable mono select
Update mono.spec tests to verify the use of the new isLoading and default value, async options fetching props and the loader.
Configuration menu - View commit details
-
Copy full SHA for 8c576ba - Browse repository at this point
Copy the full SHA 8c576baView commit details -
💬(react) add select loader translations
updates english and french translations for the loader of select component showed during options fetching.
Configuration menu - View commit details
-
Copy full SHA for bb2c096 - Browse repository at this point
Copy the full SHA bb2c096View commit details -
🔧(vitest) add workspace configuration
Creates a vitest workspace configuration file in root folder. It allows to run all tests in debug mode inside IntelliJ - https://vitest.dev/guide/debugging.html\#intellij-idea - https://vitest.dev/guide/workspace.html\#defining-a-workspace
Configuration menu - View commit details
-
Copy full SHA for f573509 - Browse repository at this point
Copy the full SHA f573509View commit details -
♻️(react) improve select mono searchable
It simplifies the code related with the asynchronous options fetching and renames related component tests names
Configuration menu - View commit details
-
Copy full SHA for 5d9dee9 - Browse repository at this point
Copy the full SHA 5d9dee9View commit details -
♻️(react) gather options fetching code in mono select
This prepares the select component to work both in controlled and uncontrolled context when the component is searchable and has to fetch the options. Also refactor the related tests and add a skipped test for controlled context.
Configuration menu - View commit details
-
Copy full SHA for 7d25e30 - Browse repository at this point
Copy the full SHA 7d25e30View commit details -
✅(react) test controlled Select mono searchable with fetched options
Add component test for controlled Select mono searchable with fetched options. Makes sure to not call the fetch options callback when previous search is the same as the current one.
Configuration menu - View commit details
-
Copy full SHA for 6be1825 - Browse repository at this point
Copy the full SHA 6be1825View commit details -
📝(react) add story for Select mono
Add story for searchable controlled with async options fetching mono select.
Configuration menu - View commit details
-
Copy full SHA for 193b0fe - Browse repository at this point
Copy the full SHA 193b0feView commit details -
📝(react) update documentation of mono select
It updates the storybook files by adding instructions about the select mono searchable with options fetching.
Configuration menu - View commit details
-
Copy full SHA for 104b794 - Browse repository at this point
Copy the full SHA 104b794View commit details -
💄(react) move loader for select mono searchable
Adds or removes loader and actions buttons according to loading status when select mono searchable is fetching options.
Configuration menu - View commit details
-
Copy full SHA for 0dfb7b7 - Browse repository at this point
Copy the full SHA 0dfb7b7View commit details -
🐛(react) fix options fetching in select mono searchable
Options fetching callback is now executed only on search input change event and when component is mounted if it uses a default value. Previously, even selecting an option used to trigger the options fetching. The select also now has the disabled status when initial fetch options callback is triggered.
Configuration menu - View commit details
-
Copy full SHA for 19a0ca0 - Browse repository at this point
Copy the full SHA 19a0ca0View commit details -
🐛(react) fix options reset for select mono searchable
Allows to clear selected options when select mono searchable uses options fetching and is controlled.
Configuration menu - View commit details
-
Copy full SHA for ab25244 - Browse repository at this point
Copy the full SHA ab25244View commit details -
🐛(react) fix select mono searchable menu toggle
Prevents options menu to open again at click on arrow down button when select mono searchable uses options fetching
Configuration menu - View commit details
-
Copy full SHA for 1965f80 - Browse repository at this point
Copy the full SHA 1965f80View commit details -
⏪️(react) revert select mono searchable menu toggle change
This reverts commit 87d9e7e.
Configuration menu - View commit details
-
Copy full SHA for 6f212af - Browse repository at this point
Copy the full SHA 6f212afView commit details -
⏪️(react) cancel options reset for select mono searchable
This reverts commit a1515a2.
Configuration menu - View commit details
-
Copy full SHA for f883441 - Browse repository at this point
Copy the full SHA f883441View commit details -
🐛(react) fix options reset for select mono searchable
Allows to clear selected options when select mono searchable uses options fetching and is controlled.
Configuration menu - View commit details
-
Copy full SHA for 8051ba5 - Browse repository at this point
Copy the full SHA 8051ba5View commit details -
📝(react) update stories for mono select
Stories with searchable and options fetching now fetch all options without filtering them with search term at initial options fetching
Configuration menu - View commit details
-
Copy full SHA for 0fd628f - Browse repository at this point
Copy the full SHA 0fd628fView commit details -
🐛(react) select mono searchable work with loading state
- fix displaying and hidding of inner actions elements accordingly to loading state and apply display none on action arrow button - updates related component tests The arrow button needs to remain in the dom to not reset its react ref. That is why we apply a display none css rule to its visual element instead of taking the component out of the DOM.
Configuration menu - View commit details
-
Copy full SHA for f744390 - Browse repository at this point
Copy the full SHA f744390View commit details -
🚸(react) change select mono arrow button
- make arrow button keyboard navigable
Configuration menu - View commit details
-
Copy full SHA for 00d50dd - Browse repository at this point
Copy the full SHA 00d50ddView commit details -
✨(react) add options fetching to controllable select mono searchable
- update related component tests - apply fixes to SelectMonoSearchable concerning loading state and refactors - prevent passing a string array in value prop to select mono - update storybook documentation and options fetching utils
Configuration menu - View commit details
-
Copy full SHA for 6fd14cb - Browse repository at this point
Copy the full SHA 6fd14cbView commit details -
🐛(react) update mono select options fetching
- execute options fetching on select mono searchable when clear button is clicked - update related tests and a new one
Configuration menu - View commit details
-
Copy full SHA for 0f780aa - Browse repository at this point
Copy the full SHA 0f780aaView commit details -
📝(react) update stories for mono select
- update description for searchable select with options fetching
Configuration menu - View commit details
-
Copy full SHA for 3a1607b - Browse repository at this point
Copy the full SHA 3a1607bView commit details -
🎨(react) improve select mono-common code
- simplify the reading of the condition displaying the clear button - update CHANGELOG.md for release
Configuration menu - View commit details
-
Copy full SHA for ab61478 - Browse repository at this point
Copy the full SHA ab61478View commit details -
Configuration menu - View commit details
-
Copy full SHA for 13e89dc - Browse repository at this point
Copy the full SHA 13e89dcView commit details