anmcgrath / BlazorDatasheet

Simple excel-like datasheet Blazor component
MIT License
163 stars 40 forks source link

Some improvements #48

Closed for7raid closed 1 year ago

for7raid commented 1 year ago

Hello @anmcgrath !

Please take a look at this PR. Welcome to code review and feedback.

  1. Added two new editors (textarea and typed enum)
  2. Sheet object passed to renderer for more complex scenarios in custom renders
  3. Data object is upped to IReadOnlyCell for the same purpose
  4. fix errors when copy data with multiline and tabbed text
  5. Added TextAlign property to Format object
  6. Keyboard handling improved to handle not only English keyboard layout
  7. F2 key begins edit like Excel
  8. some simple refactoring
  9. Examples are enriched
  10. Fix null refrence exception while render unbounded cells
  11. Added SetCellReadOnly method
  12. Fix issue about render merged cells at firt render
  13. Fix issue when mousemove event can't send message to server throw disposed dotnet object
anmcgrath commented 1 year ago

Hi @for7raid thank you for the contributions!

I only have two comments to make from these changes:

  1. I'm not 100% sure whether we should include an Enum editor as a default component - Maybe it can be registered in the examples in addition to the number editor example that is already there?
  2. I think the SetCellReadOnly function should be implemented as a command so that it can be undone/redone like a lot of the other sheet functions.

Thanks again!

for7raid commented 1 year ago

@anmcgrath Hi!

  1. Why not? This is simple base component for very often cases, I do not register it as default, any developer can register it himself if needed, no need - no use :)
  2. Ok, my bad, change it soon

thanks for reply!

for7raid commented 1 year ago
    • done, modified to command
anmcgrath commented 1 year ago

Thanks @for7raid . Re point 1 - fair enough, happy to leave it in.

Thanks for adding the command for setting readonly and the associated test.