) : (
diff --git a/comps/ui/typeahead.tsx b/comps/ui/typeahead.tsx
index 350ee58..d7ce33b 100755
--- a/comps/ui/typeahead.tsx
+++ b/comps/ui/typeahead.tsx
@@ -337,18 +337,33 @@ export const Typeahead: FC<{
0
+ ? css`
+ input {
+ margin-top: 5px;
+ }
+ `
+ : css`
+ input {
+ margin-top: 5px;
+ }
+ `
)}
onClick={() => {
if (!disabled) input.current?.focus();
}}
>
{local.mode === "multi" ? (
- <>
+
{valueLabel.map((e, idx) => {
return (
{
if (!disabled) {
@@ -377,7 +393,7 @@ export const Typeahead: FC<{
);
})}
- >
+
) : (
<>>
)}
@@ -531,7 +547,7 @@ export const Typeahead: FC<{
disabled={disabled}
spellCheck={false}
className={cx(
- "c-flex-1 c-mb-2 c-text-sm c-outline-none c-bg-transparent",
+ "c-flex-1 c-mb-2 c-outline-none c-bg-transparent",
local.mode === "single" ? "c-cursor-pointer" : ""
)}
onKeyDown={keydown}
diff --git a/utils/format-value.tsx b/utils/format-value.tsx
index 6199821..ba40b8b 100755
--- a/utils/format-value.tsx
+++ b/utils/format-value.tsx
@@ -130,6 +130,46 @@ export const FormatValue: FC<{
return
;
}
+ if (name.startsWith("desc")) {
+ return (
+
+ );
+ }
+
+ if (typeof value === "string" && value.startsWith("_file/")) {
+ return (
+
![]()
{
+ let _url = siteurl(value || "");
+ window.open(_url, "_blank");
+ }}
+ className={cx(
+ "c-rounded-md",
+ css`
+ &:hover {
+ outline: 2px solid #1c4ed8;
+ }
+ `,
+ css`
+ width: 25px;
+ height: 25px;
+ background-image: linear-gradient(45deg, #ccc 25%, transparent 25%),
+ linear-gradient(135deg, #ccc 25%, transparent 25%),
+ linear-gradient(45deg, transparent 75%, #ccc 75%),
+ linear-gradient(135deg, transparent 75%, #ccc 75%);
+ background-size: 25px 25px; /* Must be a square */
+ background-position: 0 0, 12.5px 0, 12.5px -12.5px, 0px 12.5px; /* Must be half of one side of the square */
+ `
+ )}
+ src={siteurl(
+ `/_img/${value.substring("_file/".length)}?${"w=25&h=25&fit=cover"}`
+ )}
+ />
+ );
+ }
+
return (