Comments (3)
Hey @Codemaine. I'll take a look at this today
from shadcn-tag-input.
@Codemaine Thank you for your suggestion and for engaging with the development of the component. After carefully considering the proposal to integrate React Hook Form's control and rules directly into TagInput, I have decided to not integrate the change. There isn't a compelling reason to tightly couple the TagInput with React Hook Form by handling control and rules directly, it's generally better to use Controller. This approach keeps the component flexible and clean, focusing on its primary functionalities while relying on React Hook Form to handle form state and validation externally
from shadcn-tag-input.
I've found a temporary solution:
<Controller name="tags" control={control} rules={{ required: true }} render={({ field }) => <TagInput placeholder="Enter a topic" tags={tags} id="tags" maxTags={5} minTags={2} value={field.value} setTags={(newTags) => { setTags(newTags); field.onChange(newTags) }} title="Select up to 5 tags" />} />
from shadcn-tag-input.
Related Issues (20)
- Closing of Tag Popover when clicking outside HOT 2
- No gap between tags and input
- Autocomplete suggestions aren't clickable and don't always appear HOT 3
- Backspace Not remove character. Please Help. HOT 8
- Chevron doesn't rotate on opening popover
- Disabled prop accepted but not implemented
- No styling for Clear All button
- Vite bundling error HOT 3
- Issue on mobile devices HOT 2
- Can you remove console.logs? HOT 1
- Copy/Paste to create multiple tags at ones HOT 4
- [bug]: TypeError: Cannot read properties of undefined (reading 'filter') after upgrading to version 1.4.2 HOT 4
- [bug]: Autocomplete broken (even in docs demo) - popover does not appear while typing HOT 4
- [bug]: emblor showcount not working with enableAutocomplete option HOT 1
- [feat]: Allow keyboard ↑↓ to select autocomplete suggestion HOT 1
- [feat]: Automatically add input text as tags when clicking away HOT 2
- [feat]: upgrade dep 'tailwind-merge' HOT 1
- [bug]: Unused ref
- [bug]: Autocomplete Suggestions
- [feat]: Pass function to generate tag id HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shadcn-tag-input.