timc1 / kbar

fast, portable, and extensible cmd+k interface for your site
https://kbar.vercel.app
MIT License
4.84k stars 185 forks source link

fix: don't spread defaultPlaceholder onto input #206

Closed tobiasandersen closed 2 years ago

tobiasandersen commented 2 years ago

Currently when passing a defaultPlaceholder prop to <KBarSearch /> it will also spread that prop onto the input element, resulting in the following warning:

react-dom.development.js:67 Warning: React does not recognize the `defaultPlaceholder` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `defaultplaceholder` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
vercel[bot] commented 2 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/timc/kbar/HqU6xmc8UFQseGr8LdozZ9ssbP1v
✅ Preview: https://kbar-git-fork-tobiasandersen-fix-default-placeholder-timc.vercel.app

timc1 commented 2 years ago

Fixed as part of https://github.com/timc1/kbar/commit/3d1c4c7451d37ff15313b58e9b6689f6cd0fd887