Skip to content

Truncate get error on 'width' prop when my app still work in another tab like keep-alive component #137

@Sindr0me

Description

@Sindr0me

Hi, im working with iframe in tabs in my app. Every iframe is a separately react app. So I have a problem that when I leave from my tab with truncates components like that to another tab

          <Truncate
            onTruncate={param => {
              setTooltip(param);
            }}
            lines={truncateRows || 1}
            width={truncateOnWidth || 0}
            className="truncate-cell"
          >
            {value && value}
          </Truncate>

My app still works and has crashed with an error like this when the component has rerendered with newly uploaded data

Uncaught
Exception { name: "NS_ERROR_FAILURE", message: "", result: 2147500037, filename: "webpack-internal:///./node_modules/react-truncate/lib/Truncate.js", lineNumber: 182, columnNumber: 0, data: null,

It's wrong only with prop 'width', If it prop have a value, the app will be crushed. So, I really confused about it.

p.s. my truncate cells will rerender sometimes because the new data can be uploaded anytime

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions