Skip to content
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

when adding practices, good to have autocompletes for different additional data added to notes #35

Open
kapil1garg opened this issue Apr 19, 2024 · 0 comments

Comments

@kapil1garg
Copy link
Contributor

some resources that could help:

another thing is getting autocompletes. some things to resolve in doing this:

simple code chunk:

const App = () => {
  const [suggestions, setSuggestions] = useState([]);

  const handleInputChange = (event) => {
    const value = event.target.value;
    setSuggestions(getSuggestions(value));
  };

  const renderSuggestions = () => {
    return (
      <ul>
        {suggestions.map((item) => (
          <li key={item.id}>{item.name}</li>
        ))}
      </ul>
    );
  };

  return (
    <div>
      <input
        type="text"
        onChange={handleInputChange}
        value={value}
      />
      {suggestions.length > 0 && renderSuggestions()}
    </div>
  );
};
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

No branches or pull requests

1 participant