Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Sindr0me opened this issue Aug 13, 2020 · 0 comments

Comments

@Sindr0me
Copy link

Sindr0me commented Aug 13, 2020

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

@Sindr0me Sindr0me changed the title Truncate get error on 'width' prop when i change the tab Truncate get error on 'width' prop when my app still work in another tab like keep-alive component Aug 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant