@engagebay/engagebay-form-module 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -45,7 +45,7 @@ const RenderListOptions = forwardRef<HTMLUListElement, RenderListOptionsProps>(
|
|
|
45
45
|
queryCallback,
|
|
46
46
|
createCallback,
|
|
47
47
|
},
|
|
48
|
-
ref
|
|
48
|
+
ref,
|
|
49
49
|
) => {
|
|
50
50
|
const [query, setQuery] = useState<string>("");
|
|
51
51
|
const [createdListItems, setCreatedListItems] = useState<
|
|
@@ -90,7 +90,7 @@ const RenderListOptions = forwardRef<HTMLUListElement, RenderListOptionsProps>(
|
|
|
90
90
|
.filter((result) => result.label)
|
|
91
91
|
.filter(
|
|
92
92
|
(option, index, self) =>
|
|
93
|
-
index === self.findIndex((obj) => obj.value === option.value)
|
|
93
|
+
index === self.findIndex((obj) => obj.value === option.value),
|
|
94
94
|
),
|
|
95
95
|
]; // removing duplicate values
|
|
96
96
|
|
|
@@ -178,7 +178,7 @@ const RenderListOptions = forwardRef<HTMLUListElement, RenderListOptionsProps>(
|
|
|
178
178
|
<>
|
|
179
179
|
<div className="flex items-center justify-between gap-x-1.5">
|
|
180
180
|
<span
|
|
181
|
-
className={`block truncate w-full
|
|
181
|
+
className={`block truncate w-full ${fieldConfig.customClassNames?.optionClassName} space-x-2 ${
|
|
182
182
|
selected ? "font-medium" : "font-normal"
|
|
183
183
|
}`}
|
|
184
184
|
>
|
|
@@ -318,7 +318,7 @@ const RenderListOptions = forwardRef<HTMLUListElement, RenderListOptionsProps>(
|
|
|
318
318
|
</div>
|
|
319
319
|
</ListboxOptions>
|
|
320
320
|
);
|
|
321
|
-
}
|
|
321
|
+
},
|
|
322
322
|
);
|
|
323
323
|
|
|
324
324
|
export default RenderListOptions;
|
|
@@ -326,7 +326,7 @@ export function renderListBoxValue(
|
|
|
326
326
|
formContext: FormContextType,
|
|
327
327
|
fieldConfig: FormFieldSchema,
|
|
328
328
|
listOptions: FieldOptionsSchema[],
|
|
329
|
-
onChange?: (value: any) => void
|
|
329
|
+
onChange?: (value: any) => void,
|
|
330
330
|
): JSX.Element {
|
|
331
331
|
let value = formContext.getValues(fieldConfig.name);
|
|
332
332
|
const renderAsString = () => {
|
|
@@ -338,10 +338,17 @@ export function renderListBoxValue(
|
|
|
338
338
|
return icon ? (
|
|
339
339
|
<span className="flex items-center fs-8 whitespace-nowrap text-gray-500">
|
|
340
340
|
<span>{icon}</span>
|
|
341
|
-
|
|
341
|
+
|
|
342
|
+
<Tippy content={label} delay={500}>
|
|
343
|
+
<span className="block truncate">{label}</span>
|
|
344
|
+
</Tippy>
|
|
342
345
|
</span>
|
|
346
|
+
) : label ? (
|
|
347
|
+
<Tippy content={<>{label}</>} delay={500}>
|
|
348
|
+
<span className="block truncate">{label}</span>
|
|
349
|
+
</Tippy>
|
|
343
350
|
) : (
|
|
344
|
-
|
|
351
|
+
getPlaceholder()
|
|
345
352
|
);
|
|
346
353
|
};
|
|
347
354
|
const renderAsArray = () => {
|
|
@@ -370,7 +377,12 @@ export function renderListBoxValue(
|
|
|
370
377
|
|
|
371
378
|
return (
|
|
372
379
|
<span key={option?.value} className="form-selected-badge">
|
|
373
|
-
<
|
|
380
|
+
<Tippy content={option?.label} delay={500}>
|
|
381
|
+
<span className="form-selected-badge-name">
|
|
382
|
+
{option?.label}
|
|
383
|
+
</span>
|
|
384
|
+
</Tippy>
|
|
385
|
+
|
|
374
386
|
{getDeleteButton(opt)}
|
|
375
387
|
</span>
|
|
376
388
|
);
|