Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/pages/full/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ map.set({}, 'world')
const set = new Set([1, 2, 3])

const superLongString = '1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111'
const shortMultiLineString = `Line 1
Line 2
Line 3`
const multiLineString = `Lorem ipsum dolor sit amet,
consectetur adipiscing elit.
Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.`

const example = {
avatar,
Expand Down Expand Up @@ -101,6 +108,8 @@ const example = {
[3, 4]
],
superLongString,
shortMultiLineString,
multiLineString,
function: aPlusB,
constFunction: aPlusBConst,
anonymousFunction: function (a: number, b: number) {
Expand Down
5 changes: 3 additions & 2 deletions src/components/DataTypes/String.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ export const stringType = defineEasyType<string>({
const value = showRest
? props.value
: props.value.slice(0, collapseStringsAfterLength)
const hasRest = props.value.length > collapseStringsAfterLength
const hasRest = (props.value.length > collapseStringsAfterLength) || props.value.includes('\n')
return (
<Box
component='span'
sx={{
overflowWrap: 'anywhere',
cursor: hasRest ? 'pointer' : 'inherit'
cursor: hasRest ? 'pointer' : 'inherit',
whiteSpace: showRest ? 'pre-wrap' : 'normal'
}}
onClick={() => {
if (window.getSelection()?.type === 'Range') {
Expand Down
1 change: 1 addition & 0 deletions src/components/mui/DataBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const DataBox: FC<DataBoxProps> = props => (
{...props}
sx={{
display: 'inline-block',
verticalAlign: 'top',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without aligning to top, each line of the text goes from bottom up, and the labels also aligns to the bottom of the text.

without aligning top:
CleanShot 2025-10-27 at 12 14 10

with aligning top:
CleanShot 2025-10-27 at 12 15 35

...props.sx
}}
/>
Expand Down