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

chore: Fixed table not being defined in getBoundingClientRect() and better TS support for tables #3309

Merged
merged 2 commits into from
Jan 4, 2024

Conversation

Palanikannan1437
Copy link
Collaborator

@Palanikannan1437 Palanikannan1437 commented Jan 3, 2024

Description

Fixed error of table not being defined while getting getBoundingClientRect() and solved the following TS issues as well.

  • Added ResolvedPos import from @tiptap/pm/model
  • Updated setCellsBackgroundColor function parameter type to string
  • Declared ToolboxItem type for toolbox items
  • Modified columnsToolboxItems and rowsToolboxItems to use the ToolboxItem type
  • Updated createToolbox function parameters to specify Element or null for triggerButton and ToolboxItem[] for items
  • Added ts-expect-error comment above the toolbox variable declaration
  • Updated update method parameter type to readonly Decoration[]
  • Changed destructuring assignment of hoveredTable and hoveredCell in updateControls method to use Object.values and reduce method
  • Added null check for this.table in updateControls method
  • Wrapped the code that updates columnsControl and rowsControl with null checks for each control
  • Replaced ts-ignore comments with proper dispatch calls in selectColumn and selectRow methods

sriramveeraghanta and others added 2 commits December 30, 2023 21:33
fix: project settings form not loading new data while switching between projects
error of table not being defined while getting getBoundingClientRect()
and solve other TS issues

- Added ResolvedPos import from @tiptap/pm/model
- Updated setCellsBackgroundColor function parameter type to string
- Declared ToolboxItem type for toolbox items
- Modified columnsToolboxItems and rowsToolboxItems to use the ToolboxItem type
- Updated createToolbox function parameters to specify Element or null for triggerButton and ToolboxItem[] for items
- Added ts-expect-error comment above the toolbox variable declaration
- Updated update method parameter type to readonly Decoration[]
- Changed destructuring assignment of hoveredTable and hoveredCell in updateControls method to use Object.values and reduce method
- Added null check for this.table in updateControls method
- Wrapped the code that updates columnsControl and rowsControl with null checks for each control
- Replaced ts-ignore comments with proper dispatch calls in selectColumn and selectRow methods
@sriramveeraghanta sriramveeraghanta changed the base branch from preview to develop January 3, 2024 12:57
@sriramveeraghanta sriramveeraghanta added this to the v0.14.3-dev milestone Jan 3, 2024
@sriramveeraghanta sriramveeraghanta merged commit 0927fa1 into develop Jan 4, 2024
@sriramveeraghanta sriramveeraghanta deleted the fix/table-rect-error branch January 4, 2024 11:00
sriramveeraghanta added a commit that referenced this pull request Jan 22, 2024
…ry (#3309)

error of table not being defined while getting getBoundingClientRect()
and solve other TS issues

- Added ResolvedPos import from @tiptap/pm/model
- Updated setCellsBackgroundColor function parameter type to string
- Declared ToolboxItem type for toolbox items
- Modified columnsToolboxItems and rowsToolboxItems to use the ToolboxItem type
- Updated createToolbox function parameters to specify Element or null for triggerButton and ToolboxItem[] for items
- Added ts-expect-error comment above the toolbox variable declaration
- Updated update method parameter type to readonly Decoration[]
- Changed destructuring assignment of hoveredTable and hoveredCell in updateControls method to use Object.values and reduce method
- Added null check for this.table in updateControls method
- Wrapped the code that updates columnsControl and rowsControl with null checks for each control
- Replaced ts-ignore comments with proper dispatch calls in selectColumn and selectRow methods

Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>
sriramveeraghanta added a commit that referenced this pull request Jan 22, 2024
…ry (#3309)

error of table not being defined while getting getBoundingClientRect()
and solve other TS issues

- Added ResolvedPos import from @tiptap/pm/model
- Updated setCellsBackgroundColor function parameter type to string
- Declared ToolboxItem type for toolbox items
- Modified columnsToolboxItems and rowsToolboxItems to use the ToolboxItem type
- Updated createToolbox function parameters to specify Element or null for triggerButton and ToolboxItem[] for items
- Added ts-expect-error comment above the toolbox variable declaration
- Updated update method parameter type to readonly Decoration[]
- Changed destructuring assignment of hoveredTable and hoveredCell in updateControls method to use Object.values and reduce method
- Added null check for this.table in updateControls method
- Wrapped the code that updates columnsControl and rowsControl with null checks for each control
- Replaced ts-ignore comments with proper dispatch calls in selectColumn and selectRow methods

Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>
@Palanikannan1437 Palanikannan1437 changed the title [chore]: Fixed table not being defined in getBoundingClientRect() and better TS support for tables chore: Fixed table not being defined in getBoundingClientRect() and better TS support for tables Jan 31, 2024
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