Skip to content

remove inlines form react datagrid demos - #35128

Open
DuckTieCorpMember wants to merge 2 commits into
DevExpress:feature/react-inline-eslint-rulesfrom
DuckTieCorpMember:remove-inlines-datagrid-cardview-demos
Open

remove inlines form react datagrid demos#35128
DuckTieCorpMember wants to merge 2 commits into
DevExpress:feature/react-inline-eslint-rulesfrom
DuckTieCorpMember:remove-inlines-datagrid-cardview-demos

Conversation

@DuckTieCorpMember

Copy link
Copy Markdown
Contributor

This PR goes through DataGrid and CardView React demos and replaces inlines with objects and functions

Comment thread apps/demos/Demos/CardView/FieldTemplate/React/Progress.tsx Outdated
</DataGrid>
);
const DetailGrid = ({ data: detail }: { data: DataGridTypes.MasterDetailTemplateData }) => {
const detailDataSource = getDetailGridDataSource(detail.data);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

wrap in useMemo, please

</Summary>
</DataGrid>
);
const DetailGrid = ({ data: detail }: { data: DataGridTypes.MasterDetailTemplateData }) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We use this component as prop, lets wrap it with memo - it would be useful to wrap other custom components with props in memo, but it can wait

Suggested change
const DetailGrid = ({ data: detail }: { data: DataGridTypes.MasterDetailTemplateData }) => {
import { memo } from 'react';
const DetailGrid = memo(({ data: detail }: { data: DataGridTypes.MasterDetailTemplateData }) => {

Co-authored-by: Anna Shakhova <68295572+anna-shakhova@users.noreply.github.com>
Signed-off-by: assylbek.danyshbek <assylbek.danyshbek@devexpress.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants