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
tsify more addons modules #1661
Conversation
} | ||
|
||
export default function ImageFormatter({ value }: Props) { | ||
return <div className="react-grid-image" style={{ backgroundImage: `url(${value})` }} />; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous ImageFormatter
implementation loaded the url in the background before applying the style, I don't know why, doesn't seem worthwhile.
|
||
render() { | ||
return ( | ||
<ContextMenu identifier="reactDataGridContextMenu"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug uncovered: identifier
is not a valid prop, id
is though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a few comments
packages/react-data-grid-addons/src/cells/headerCells/filters/NumericFilter.tsx
Outdated
Show resolved
Hide resolved
<div> | ||
<div style={columnStyle}> | ||
<input | ||
key={inputKey} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing type="text"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input
If this attribute is not specified, the default type adopted is
text
.
I can add it, but it's not necessary. wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I usually prefer to add it to be explicit but it is fine in this case
|
||
// implement default filter logic | ||
const value = parseInt(row[columnKey] as string, 10); | ||
for (const ruleKey in columnFilter.filterTerm) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for (const rule of columnFilter.filterTerm)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not an iterable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I got confused with filterTerm: Rule[] | null;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.