inline editing with select - changes row height
inline editing with select - changes row height
![nampord](https://secure.gravatar.com/avatar/f0aa539c891d0e0d9e465630742af9f6/?default=https%3A%2F%2Fvanillicon.com%2Ff0aa539c891d0e0d9e465630742af9f6_200.png&rating=g&size=120)
When placing a select dropdown in a cell for inline editing the row height changes when the user activates the cell for editing.
This issue can be seen in the standard example at
https://editor.datatables.net/examples/inline-editing/join.html
when selecting the last column (location) the row height changes slightly -
With the bootstrap theme this issue becomes much more pronounced
Is there a way to change the padding of the cell to 0px when the select is opened and set it back to the original value once the selects is closed ?
Answers
In your HTML you would need to assign the class "dropDownCol" (or whatever you want to call it) to the column.
Then assign a class to each cell in the column with the dropdown:
https://datatables.net/reference/option/columns.className
e.g. "dropDownColCell". You can specify a class as the target. No column number is needed.
Then you can add a class to the cell that sets padding to 0px.
https://datatables.net/reference/api/cell().node()
Like this for example:
Don't have the time right now to figure out which event to use to get rid of the class when moving away ...