I've got a dataset control that I'm just using for an N:N link that will connect users to an activity. There seems to be a 12em min-height applied to the control that I can't for the life of me override. Is this the min-height of a dataset control? Can you alter it somehow? I'd like this to be more responsive.
No luck unfortunately, which I guess means there's no way around this at the moment.
Just checked and found that there is a minimum enforced for this value which is 2 rows. Can you try setting the min value on the sub-grid properties and see if this helps ?
hemant
I just did a quick test where this is all I did for a dataset control:
import {IInputs, IOutputs} from "./generated/ManifestTypes";
import DataSetInterfaces = ComponentFramework.PropertyHelper.DataSetApi;
type DataSet = ComponentFramework.PropertyTypes.DataSet;
export class minHeightDatasetTEST implements ComponentFramework.StandardControl<IInputs, IOutputs> {
/**
* Empty constructor.
*/
constructor()
{
}
/**
* Used to initialize the control instance. Controls can kick off remote server calls and other initialization actions here.
* Data-set values are not initialized here, use updateView.
* @Param context The entire property bag available to control via Context Object; It contains values as set up by the customizer mapped to property names defined in the manifest, as well as utility functions.
* @Param notifyOutputChanged A callback method to alert the framework that the control has new outputs ready to be retrieved asynchronously.
* @Param state A piece of data that persists in one session for a single user. Can be set at any point in a controls life cycle by calling 'setControlState' in the Mode interface.
* @Param container If a control is marked control-type='standard', it will receive an empty div element within which it can render its content.
*/
public init(context: ComponentFramework.Context<IInputs>, notifyOutputChanged: () => void, state: ComponentFramework.Dictionary, container:HTMLDivElement): void
{
// Add control initialization code
const customDiv: HTMLDivElement = document.createElement("div");
customDiv.setAttribute("id", "customMinHeightTest");
customDiv.textContent = "Hello World!";
container.appendChild(customDiv);
}
/**
* Called when any value in the property bag has changed. This includes field values, data-sets, global values such as container height and width, offline status, control metadata values such as label, visible, etc.
* @Param context The entire property bag available to control via Context Object; It contains values as set up by the customizer mapped to names defined in the manifest, as well as utility functions
*/
public updateView(context: ComponentFramework.Context<IInputs>): void
{
// Add code to update control view
console.log(context)
}
/**
* It is called by the framework prior to a control receiving new data.
* @returns an object based on nomenclature defined in manifest, expecting object[s] for property marked as “bound” or “output”
*/
public getOutputs(): IOutputs
{
return {};
}
/**
* Called when the control is to be removed from the DOM tree. Controls should use this call for cleanup.
* i.e. cancelling any pending remote calls, removing listeners, etc.
*/
public destroy(): void
{
// Add code to cleanup control if necessary
}
}
The result was the same in regards to the min height:
It's this min-height being applied much further up the tree. Seems to be the height required to show two rows and paging.
Agreed. Check all your style inheritances. Somewhere in that you will find what is setting that height.
Hi @skoofy5 ,
I am not aware of any min-height applied to the DIV which is your PCF container.
Maybe it's something provided by the controls you use.
You can track with the developer tools, what CSS is setting the min-height. You should be able to see it, even if it's generated at runtime.
Kind regards,
Diana
WarrenBelz
94
Most Valuable Professional
Michael E. Gernaey
72
Super User 2025 Season 1
mmbr1606
71
Super User 2025 Season 1