datajunction-ui 0.0.1-a42 → 0.0.1-a42.dev0
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/dj.internal.db +0 -0
- package/package.json +1 -1
- package/src/app/components/Search.jsx +4 -1
package/dj.internal.db
ADDED
|
File without changes
|
package/package.json
CHANGED
|
@@ -12,6 +12,9 @@ export default function Search() {
|
|
|
12
12
|
const djClient = useContext(DJClientContext).DataJunctionAPI;
|
|
13
13
|
|
|
14
14
|
const truncate = str => {
|
|
15
|
+
if (str === null) {
|
|
16
|
+
return '';
|
|
17
|
+
}
|
|
15
18
|
return str.length > 100 ? str.substring(0, 90) + '...' : str;
|
|
16
19
|
};
|
|
17
20
|
useEffect(() => {
|
|
@@ -85,7 +88,7 @@ export default function Search() {
|
|
|
85
88
|
</span>
|
|
86
89
|
{item.display_name} (<b>{item.name}</b>){' '}
|
|
87
90
|
{item.description ? '- ' : ' '}
|
|
88
|
-
{truncate(item.description)}
|
|
91
|
+
{truncate(item.description || '')}
|
|
89
92
|
</div>
|
|
90
93
|
</a>
|
|
91
94
|
);
|