reno-ui

ComboboxCreatable

Combobox có thêm dòng "Tạo ..." khi ô tìm kiếm không khớp lựa chọn nào: gọi onCreate với đúng chữ đã gõ, chờ được round-trip lên server (có trạng thái đang tạo), tạo hỏng thì giữ nguyên chữ và báo lỗi. Dùng chung kiểu option với combobox.

Cài đặt

npx shadcn@latest add @reno/combobox-creatable

Demo

Đã chọn: Hướng dẫn

npm dependencies

  • lucide-react@^1.38.0

Registry dependencies

  • @reno/utils
  • @reno/button
  • @reno/popover
  • @reno/command
  • @reno/spinner
  • @reno/combobox