Skip to content

Add Search component extending TextInput and Button#37

Closed
Copilot wants to merge 3 commits intomainfrom
copilot/add-search-component
Closed

Add Search component extending TextInput and Button#37
Copilot wants to merge 3 commits intomainfrom
copilot/add-search-component

Conversation

Copy link

Copilot AI commented Nov 2, 2025

Implements a reusable <Search /> component that composes TextInput and Button for search functionality with database integration support.

Changes

  • New Search component (app/components/Search.tsx)

    • Combines TextInput and Button in flexbox layout
    • Exposes onSearch callback for search execution (button click or Enter key)
    • Optional onChange for real-time input monitoring
    • Configurable: placeholder, button label, icon, initial value
  • Extended TextInput component

    • Added props: value, onChange, onKeyPress, placeholder, type, disabled, label
    • Now supports controlled input pattern required by Search

Usage

import Search from "./components/Search";

<Search
  placeholder="Search catalog..."
  onSearch={(term) => fetchResults(term)}
  onChange={(value) => updateSuggestions(value)}
  buttonLabel="Find"
/>

The component structure supports future database integration via the callback props.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • fonts.googleapis.com
    • Triggering command: /usr/local/bin/node /home/REDACTED/work/bethesource/bethesource/node_modules/next/dist/compiled/jest-worker/processChild.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>New Component: Search</issue_title>
<issue_description>Implement a <Search /> component.

This should also later handle searching based on some metric, which should tie in with the database.

This should extend the <TextInput /> component and the <Button /> component</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits November 2, 2025 21:27
Co-authored-by: julialaforet <182818504+julialaforet@users.noreply.github.com>
Co-authored-by: julialaforet <182818504+julialaforet@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement new Search component with database integration Add Search component extending TextInput and Button Nov 2, 2025
Copilot AI requested a review from julialaforet November 2, 2025 21:33
@kohrachel
Copy link
Contributor

Closing as duplicate of #36

@kohrachel kohrachel closed this Nov 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New Component: Search

3 participants

Comments