The onSubmit function typing in the SearchBox component was changed from handling a string to handling a generic T type object. Also, the onSubmit function now uses the found item in components based on the selected suggestion to submit instead of submitting directly.
The dependencies array in the useEffect hook within SearchBox.tsx has been updated. The 'suggestions' variable has been added to the dependencies to ensure the function updates accordingly when this state changes.
Added a new stateful variable, 'queryMode', to the 'SearchBox' component in the CLI to enhance its functionality. As a result, 'Input' and suggestion fetching are now conditioned by this mode, providing more controled user search management and interaction with the autocomplete feature.
Decreased the marginRight property from 2 to 1 in the SearchBox component of the CLI to improve layout. Also modified the placeholder text in the Input field for better readability.
This commit modifies a conditional statement in the SearchBox component to properly manage the selected index based on the length of search results. This ensures appropriate selection even when the result length is less than or equal to the selected index.
In the SearchBox component, a new onSubmit prop has been added for user's search input handling. The UI has also been updated: changed border styles, introduced color changes based on selection and added placeholder for search input.
The SearchBox component in the CLI package now supports generic types, enhancing its flexibility. The onChange method now returns selected item details, instead of just returning the key. The SearchBox props have been modified to support the generic type T.
Added 'onChange' prop to the SearchBox component for active response to selection changes. Also updated the 'components' prop type and handled the related changes in the 'getSuggestion' use case. This includes mapping the components to their keys, updating the display name and handling selected results.
The search command in the CLI is enhanced to recognize search queries as command arguments. An improved interaction with the search box is also introduced, including key event handlers for up and down arrows and escape key, allowing users to navigate more intuitively. keyboard-based selection of suggestions is now implemented and the helper message is updated to match these interaction changes.
The SearchBox component in the Command Line Interface (CLI) now accepts an optional initialQuery prop. This prop is used to set the initial state of the search box query, which enables prepopulating the search box with a specific string if desired.
A new command has been added to the CLI package to search for components. This command fetches the registry and lists accessible components through the SearchBox component. The SearchBox component has also been updated to show a helper text and a new styled border for better user interaction.
A Divider and a SearchBox component have been added to the CLI. The Divider is a simple component for displaying a horizontal line. The SearchBox takes a list of components as props and provides a live search functionality, showing suggestions for user inputs.