[Docs] Fix all EuiBasicTable and EuiInMemoryTable demos to work in CodeSandbox#6553
[Docs] Fix all EuiBasicTable and EuiInMemoryTable demos to work in CodeSandbox#6553cee-chen merged 11 commits intoelastic:mainfrom
EuiBasicTable and EuiInMemoryTable demos to work in CodeSandbox#6553Conversation
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_6553/ |
bfd2911 to
9766273
Compare
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_6553/ |
elizabetdev
left a comment
There was a problem hiding this comment.
Thanks, @cee-chen. I tested all examples and LGTM.
Just found one eslint warning.
And because the data_store.js file was deleted I searched for data_store and found some instances on the following page:
Is this something we need to delete?
| const [message, setMessage] = useState( | ||
| const [users, setUsers] = useState<User[]>([]); | ||
| const [message, setMessage] = useState<ReactNode>( | ||
| <EuiEmptyPrompt |
There was a problem hiding this comment.
On line 145 in CodeSandbox there's an eslint warning for this file:
'loadUsers' was used before it was defined. (@typescript-eslint/no-use-before-define)eslint
There was a problem hiding this comment.
That issue was already "there" pre-typescript if that makes sense, but because the file wasn't .tsx, that particular eslint rule wasn't coming up 🤷 TBH it doesn't bother me and hoisting is legit JS, but I can take a look at trying to get rid of it
There was a problem hiding this comment.
Ha this is pretty annoying, loadUsers calls setMessage so there isn't a super quick or clean way to separate the two. I'm probably just going to ignore this TBH, it still works fine and our own codebase doesn't lint for this rule, so I'm pretty eh about it
There was a problem hiding this comment.
Also to answer:
Is this something we need to delete?
Nope, that particular file / test usage is a static string and not an actual import (the file is testing a regex).
Summary
closes #5959
This PR converts the last
EuiBasicTabledemo and allEuiInMemoryTabledemos to Typescript, removes thedata_storedependency, and deletes thedata_storefile.QA
General checklist