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

DataTableの<th />に文字列以外も含められるようにする #139

Merged
merged 4 commits into from
Jul 29, 2020

Conversation

youchann
Copy link
Contributor

@youchann youchann commented Jul 28, 2020

Comment on lines +88 to 90
// MEMO: nameを廃止して、headerCellのみにすることも可能
// 他の破壊的変更に合わせて行うのが良さそう
name: string;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

nameなくても良さそうと判断していますー

Copy link
Contributor

Choose a reason for hiding this comment

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

名称をいれたいだけのときも ReactNodeで渡さなきゃいけないようになるとやりすぎな気がするので、stringで名称だけ渡すこともできるようになっているといいかなーと思います headerCell: React.ReactNode | string; みたいな感じで

Copy link
Contributor Author

Choose a reason for hiding this comment

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

実はReact.ReactNode型にはstringが含まれているという噂が....

@@ -34,7 +34,7 @@ export const SortableHeaderCell: React.FunctionComponent<Props> = ({
{...rest}
>
<Flex display="flex" alignItems="center">
<Typography weight="bold" size="md" component="span">
<Typography weight="bold" size="md" component="div">
Copy link
Contributor Author

@youchann youchann Jul 28, 2020

Choose a reason for hiding this comment

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

入れ子ルール違反を避けるべくdivに

@youchann youchann self-assigned this Jul 28, 2020
@youchann youchann requested a review from maktak1995 July 28, 2020 09:31
width: 100%;
backdrop-filter: blur(2px);
background-color: ${({ theme }) =>
hexToRgba(theme.palette.background.default, 0.9)};
border-top: ${Size.Border.Small} solid ${({ theme }) => theme.palette.divider};
border-bottom: ${Size.Border.Small} solid
${({ theme }) => theme.palette.divider};
${({ theme }) => theme.palette.gray.light};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@maktak1995 maktak1995 left a comment

Choose a reason for hiding this comment

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

LGTMです!

@youchann youchann merged commit 5a40a53 into master Jul 29, 2020
@youchann youchann deleted the tweak-datatable-header branch July 29, 2020 02:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants