Rifbid Collaborators Component
Overview
The RifbidCollaborate component is the main interface for managing and exploring collaborators in the RifBid application. It integrates search, filter, and pagination features, allowing users to discover collaborators by industry, location, and semantic search.
Key Features
- Semantic Search:
- Allows users to search for collaborators using semantic keywords.
- Filter Options:
- Enables filtering by industry and location.
- Pagination:
- Supports navigation across multiple pages of collaborators.
- Live Count:
- Displays the total number of online collaborators dynamically.
- Reset and Toggle Filters:
- Offers the ability to reset or toggle filter visibility.
Component Structure
Subcomponents
| Component | Description |
|---|---|
SupplierSemanticSearchBar | Handles semantic search input and actions. |
CollaboratorSearchFilters | Provides filtering options for industry and location. |
AllCollaborators | Displays the list of collaborators based on applied filters and search. |
State Variables
| State Variable | Type | Description |
|---|---|---|
semanticSearch | string | Holds the semantic search query. |
industry | string | Stores the selected industry filter. |
country | string | Stores the selected location filter. |
showFilters | boolean | Toggles the visibility of the filter panel. |
pageNumber | number | Tracks the current page number for pagination. |
totalCollaborators | number | Displays the total number of collaborators available. |
Props for Subcomponents
CollaboratorSearchFilters
| Prop Name | Type | Description |
|---|---|---|
setIndustry | (string) => void | Callback to set the selected industry filter. |
setCountry | (string) => void | Callback to set the selected country filter. |
selectedIndustry | string | The currently selected industry filter. |
selectedCountry | string | The currently selected country filter. |
resetFilters | () => void | Callback to reset all applied filters. |
showFilters | boolean | Determines the visibility of the filter panel. |
toggleFilters | () => void | Callback to toggle filter panel visibility. |
Behavior
Semantic Search
- The
SupplierSemanticSearchBarupdates thesemanticSearchstate and triggers the collaborator list update.
Filters
- Filters can be applied or reset using the
CollaboratorSearchFilterscomponent. - Filters include:
- Industry: Dropdown menu of industry categories.
- Location: Dropdown menu of countries and regions.
Pagination
- Managed via the
AllCollaboratorscomponent. - Updates
pageNumberand dynamically fetches results for the current page.
Reset Filters
- Resets all filters and sets the
semanticSearchandpageNumberback to their default states.
CollaboratorSearchFilters Component Documentation
Overview
The CollaboratorSearchFilters component provides filter options to narrow down the list of collaborators by industry and location.
Key Features
Industry Filter: Dropdown menu to select an industry.
**Location Filter:**Dropdown menu with country and region options.
Reset Filters: Clears all applied filters with a single button.
Responsive Design: Filters are shown in a sidebar for larger screens and in an overlay for smaller screens.
Props
| Prop Name | Type | Description |
|---|---|---|
setIndustry | (string) => void | Callback to set the selected industry filter. |
setCountry | (string) => void | Callback to set the selected country filter. |
selectedIndustry | string | The currently selected industry filter. |
selectedCountry | string | The currently selected country filter. |
resetFilters | () => void | Callback to reset all applied filters. |
showFilters | boolean | Determines the visibility of the filter panel. |
toggleFilters | () => void | Callback to toggle filter panel visibility. |
Dropdown Options
Industry
- Populated from the
categorieslist.
Location
- Dropdown contains pre-defined country and region options grouped by geographic regions (e.g., Caribbean, North America, Latin America).
Conclusion
The RifbidCollaborate and CollaboratorSearchFilters components work together to provide a robust interface for discovering and managing collaborators. They integrate search, filter, and pagination functionalities with responsive design to enhance the user experience.