daniel-nagy / md-data-table

Material Design Data Table for Angular Material
MIT License
1.9k stars 520 forks source link

Edit dialog positioning #499

Open chriswilty opened 7 years ago

chriswilty commented 7 years ago

Any ideas on how to (re)position the edit dialog when it is opened?

Currently you are calculating position based on aligning the dialog with the top of the table cell, or the bottom of the cell if outside of the table bounds. Which is basically what the spec says (although whether you should align to top or bottom by default is unclear from the spec).

We have needed to shrink the height of our rows to fit on a SPA rendering on iPad, and now the edit dialog opens with the input more or less aligned to the row beneath, which is misleading; ideally I would love to be able to define my own positioning method, so that the input of the edit dialog is centre-aligned to the table cell, and is allowed to flow outside of the table as long as it does not flow outside of the page limits.

Is a custom positioning option something you would be willing to look into, or do you have any other ideas about how to reposition the dialog after it is opened and positioned using your default positioning methodology?