mongodb / chatbot

MongoDB Chatbot Framework. Powered by MongoDB and Atlas Vector Search.
https://mongodb.github.io/chatbot/
Apache License 2.0
106 stars 48 forks source link

InputBarTrigger does not accept placeholder #310

Closed eric-gardyn closed 5 months ago

eric-gardyn commented 5 months ago

doc refers to InputBarTrigger accepting a placeholder prop. https://mongodb.github.io/chatbot/ui But the latest version of the code does not.

nlarew commented 5 months ago

Hi Eric!

What version of the UI are you using? The documentation site currently reflects only the latest published version.

We added support for the placeholder prop in the 0.2.0+ releases so you should upgrade to the latest version.

npm install mongodb-chatbot-ui@^0.2.1

I just tested on v0.2.1 and was able to get this minimal example working without a problem:

import Chatbot, { InputBarTrigger } from "mongodb-chatbot-ui";
import './App.css'

function App() {
  return (
    <Chatbot serverBaseUrl="http://localhost:3000">
      <InputBarTrigger placeholder="Custom placeholder message!" />
    </Chatbot>
  );
}

export default App
Screenshot 2024-01-30 at 3 57 39 PM

Please let us know if this works for you or if you're still having issues.

eric-gardyn commented 5 months ago

thank you. I think my issue came from using the 'examples/quick-start' folder. somehow it didn't install the latest mongodb-chatbot-ui.