Refacto/abstract inplace input (#530)

* Move code to new folder

* Deduplicate code, remove dependancy on table

* Remove more table dependency

* Move close logic to input

* Migrate editable text cell

* Rename EditableTextInput

* Fix component test id
This commit is contained in:
Emilien Chauvet
2023-07-07 12:11:57 -07:00
committed by GitHub
parent 26b033abc9
commit c847bca293
19 changed files with 189 additions and 138 deletions

View File

@ -39,13 +39,13 @@ export const InteractWithManyRows: Story = {
);
expect(
canvas.queryByTestId('editable-cell-edit-mode-container'),
canvas.queryByTestId('inplace-input-edit-mode-container'),
).toBeNull();
await userEvent.click(firstRowEmailCell);
expect(
canvas.queryByTestId('editable-cell-edit-mode-container'),
canvas.queryByTestId('inplace-input-edit-mode-container'),
).toBeInTheDocument();
await userEvent.click(secondRowEmailCell);
@ -57,7 +57,7 @@ export const InteractWithManyRows: Story = {
);
expect(
canvas.queryByTestId('editable-cell-edit-mode-container'),
canvas.queryByTestId('inplace-input-edit-mode-container'),
).toBeNull();
await userEvent.click(secondRowEmailCellFocused);
@ -65,7 +65,7 @@ export const InteractWithManyRows: Story = {
await sleep(25);
expect(
canvas.queryByTestId('editable-cell-edit-mode-container'),
canvas.queryByTestId('inplace-input-edit-mode-container'),
).toBeInTheDocument();
},
parameters: {