Conversation
| storiesOf('DashTable/CSS override', module) | ||
| .add('css with escaped id', () => (<DataTable | ||
| setProps={setProps} | ||
| id={'`~!@#$%^&*()=+ \\|/.,:;\'"`?[]<>{}'} |
There was a problem hiding this comment.
Without the fix, the table does not render and throws.
There was a problem hiding this comment.
leading to the developer screaming "~!@#$%^&*()=+ \|/.,:;'"`?[]<>{}"
| />)) | ||
| .add('stringified object as id', () => (<DataTable | ||
| {...props} | ||
| id={{ id: 3, group: 'A' }} |
There was a problem hiding this comment.
FWIW you're never going to actually get an object sent to the component by the renderer as an id - the renderer stringifies the id first, and does so as sorted JSON, so you'll get '{"group":"A","id":3}'
Does DataTable separately stringify ids? Because if I just call CSS.escape on an object it just gives "\[object\ Object\]"
There was a problem hiding this comment.
Does DataTable separately stringify ids?
Oups.
41981cb
alexcjohnson
left a comment
There was a problem hiding this comment.
Just a small test question #766 (comment) otherwise this looks great! Nice and easy. 💃
Closes #765
Escapes typical problematic characters that can be used for
idand that need to be escaped for CSS selector.