Please check my demo here: https://sonic16x.github.io/e-test-task/?width=10&height=15
Your task is to develop a table component with cells merge funtional
Please check our demo: https://mergetable.web.app/?width=10&height=15
- Have to render table with size passed to query params
- Cells Have to be selected with mouse
- After selection cells can be merged or separated
- Table have to have size from
widthandheightpassed in query params - Selection have to be handled by
mousedown,mousemoveandmouseupevents - Selection have to always select 'square' zone and stretch by merged cells

- After merge or separate cells selection have to stay on previous place:
- Every cell have to have
colspanandrowspanattributes (with value 1 or more) - Every cell have to have data attributes
data-col-index- positive int. Merging or separating another cells in grid doesn't change index for current cell. For example: if previous cell in row have index0andcolspan = 2(cells with indexes0and1were merged), current cell have to have index2data-row-index- positive int. As index for columns but for rowsdata-selected- boolean
- Table have to be rendered by react components
Before send your solution run our e2e tests written in cypress.
To run tests type npm run cy:run in your terminal.
All tests should be succeeded.
Tests simulate mouse selection by
mousedownon first cell andmousemoveandmouseupon last cells
Buttons should have
data-separate-buttonanddata-merge-buttonattributes.
- Clone this repo
- Install modules
npm i - Run project
npm start - Write your code
- Pass tests
- Push your solution in your repo and send link back
- You can change any code under
srcfolder - You can change build process (project should be available on
localhost:3000for tests) - You can install or update any libraries except libraries for tables like
React tables - Change any styles
- Change any code under
cypressfolder - Change cypress version
- Change any scripts in
package.json - Amend or change any commits. You have to keep my initial commit.
✨ Good luck! ✨
