fixed-data-table-2 icon indicating copy to clipboard operation
fixed-data-table-2 copied to clipboard

Reduce dom elements - Approach #3

Open Archit101967 opened this issue 2 years ago • 0 comments

Choice on user

Description

In this PR we have given the choice to user that whether he wants to use the old code of column-virtualization or the new code which is of our div-removal branch (after removing div) .We have used higher Order components to maintain the reusability of code .We have passed one more prop named as shouldUseLegacyComponents (boolean) .On the basis of this prop we will decide which function we have to render either the legacy one or the new one .The main difference of code is in row and the cellGroup components so we have seperated the uncommon part into different functions (HOC) and then decided on the basis of if condition that which part we have to render .

Motivation and Context

To provide the functionality to user that whether he wants to use the old code or the new code (backward compatibilty)

How Has This Been Tested?

On the existing examples and then also checked the performance

Screenshots (if appropriate):

choice_on_user_reusable_500

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • [x] My code follows the code style of this project.
  • [ ] My change requires a change to the documentation.
  • [ ] I have updated the documentation accordingly.
  • [ ] I have read the CONTRIBUTING document.

Archit101967 avatar Jun 21 '23 21:06 Archit101967