Oct 12 2023 09:30 PM
Hi All,
Is there any way to set the size of "inlineeditfield" controls in the Sharepoint JSON Column Formatter. Sometimes it is a bit smaller than I would like. My gut feel is no, but it doesn't hurt to ask. If not, why not and how do I request enhancements from Microsoft?
Thanks
James
Oct 12 2023 10:43 PM
You can set fixed width for JSON element like this:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "div",
"txtContent": "@currentField",
"inlineEditField": "@currentField",
"style": {
"width": "100px"
}
}
When you don't mention the width, InlineEditField is auto adjusted based on your column width. You can change column width by following this: SharePoint Modern List - Increase column width with JSON Issue
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
Oct 14 2023 10:58 PM
Oct 16 2023 04:13 AM
Solution
Definitely not possible using the simple JSON like given above.
When you set the width to parent element it will be applied for whole column. You may be able to achieve it by creating multiple elmType and setting different width for them.
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
Oct 16 2023 04:13 AM
Solution
Definitely not possible using the simple JSON like given above.
When you set the width to parent element it will be applied for whole column. You may be able to achieve it by creating multiple elmType and setting different width for them.
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.