You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: showcase/public/showcase-sources.txt
+94-1Lines changed: 94 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -6050,9 +6050,11 @@ import {
6050
6050
ButtonGroup,
6051
6051
Label,
6052
6052
Select,
6053
+
type SelectComponentProps,
6053
6054
type OptionGroupType,
6055
+
selectComponents,
6054
6056
} from "@linked-planet/ui-kit-ts"
6055
-
import { useState } from "react"
6057
+
import { useMemo, useState } from "react"
6056
6058
import { useForm } from "react-hook-form"
6057
6059
import ShowcaseWrapperItem, {
6058
6060
type ShowcaseProps,
@@ -6203,6 +6205,92 @@ function ControlledFormExample() {
6203
6205
}
6204
6206
//#endregion select2form-controlled
6205
6207
6208
+
//#region select-custom-component
6209
+
type Book = {
6210
+
title: string
6211
+
author: string
6212
+
isbn: string
6213
+
language: string
6214
+
}
6215
+
6216
+
const books: Book[] = [
6217
+
{
6218
+
title: "The Lord of the Rings",
6219
+
author: "J.R.R. Tolkien",
6220
+
isbn: "978-3-86680-192-9",
6221
+
language: "English",
6222
+
},
6223
+
{
6224
+
title: "Harry Potter",
6225
+
author: "J.K. Rowling",
6226
+
isbn: "978-3-86680-192-9",
6227
+
language: "English",
6228
+
},
6229
+
{
6230
+
title: "The Historical Development of the Heart from Its Formation in the Primitive Vertebrate to Its Most Recent Manifestation in Modern Homo Sapiens as Seen in the Context of the Evolutionary Process, Along with Reflections on Its Influence upon Social, Cultural, and Economic Development with Reference to the Views of Charles Darwin and Other Prominent Thinkers, and Including Detailed Examinations of the Physiological and Anatomical Aspects of the Organ, with Illustrations Drawn from Various Epochs and Regions of the World, as well as a Comprehensive Study of Heart Disease and Its Treatment from Ancient Times to the Present Day, Covering Both Eastern and Western Medical Practices, with a Special Section Devoted to the Role of Diet and Lifestyle in the Maintenance of Cardiovascular Health, Alongside a Discussion of the Spiritual and Symbolic Significance of the Heart in World Religions, and an Appendix on the Potential Future Developments in Heart Transplantation and Artificial Heart Research in the 21st Century",
6231
+
author: "Nigel Tomm",
6232
+
isbn: "123-4-56789-234-5",
6233
+
language: "English",
6234
+
},
6235
+
{
6236
+
title: "ABC",
6237
+
author: "Sir Augustus Maximilian Percival Thaddeus Leopold Ambrose Fitzwilliam Kensington-Rutherford de la Croix Montmorency Beaumont Windsor St. John Alistair Edward Victor Montgomery Hawthorne-Darcy Fitzgerald, Duke of Abernathy, Marquess of Silverwood, Earl of Whitehall, Viscount Longfellow, Baron Cresswell of Eversfield",
6238
+
isbn: "123-4-56789-234-5",
6239
+
language: "English",
6240
+
},
6241
+
]
6242
+
6243
+
// https://react-select.com/components
6244
+
function BookOption(props: SelectComponentProps.OptionProps<Book>) {
0 commit comments