Navigation Menu

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

tsify more addons modules #1661

Merged
merged 10 commits into from May 24, 2019
Merged

tsify more addons modules #1661

merged 10 commits into from May 24, 2019

Conversation

nstepien
Copy link
Contributor

No description provided.

@nstepien nstepien self-assigned this May 17, 2019
}

export default function ImageFormatter({ value }: Props) {
return <div className="react-grid-image" style={{ backgroundImage: `url(${value})` }} />;
Copy link
Contributor Author

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">
Copy link
Contributor Author

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.

@nstepien nstepien changed the title tsify DropDownFormatter and ImageFormatter tsify more addons modules May 17, 2019
@nstepien nstepien marked this pull request as ready for review May 17, 2019 18:30
Copy link
Contributor

@amanmahajan7 amanmahajan7 left a 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

<div>
<div style={columnStyle}>
<input
key={inputKey}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing type="text"

Copy link
Contributor Author

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?

Copy link
Contributor

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) {
Copy link
Contributor

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)

Copy link
Contributor Author

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.

Copy link
Contributor

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;

packages/react-data-grid-addons/src/toolbars/Toolbar.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@amanmahajan7 amanmahajan7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nstepien nstepien merged commit 11a8e63 into next May 24, 2019
@nstepien nstepien deleted the addontypes branch May 24, 2019 13:03
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

Successfully merging this pull request may close these issues.

None yet

2 participants