cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
skoofy5
Advocate IV
Advocate IV

Min dataset height?

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.

skoofy5_0-1627016959903.png

 

6 REPLIES 6
DianaBirkelbach
Super User
Super User

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

Kind regards,
Diana
----------
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Agreed. Check all your style inheritances. Somewhere in that you will find what is setting that height.

cchannon_0-1627073358335.png

 

skoofy5
Advocate IV
Advocate IV

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:

skoofy5_0-1627098765013.png

It's this min-height being applied much further up the tree. Seems to be the height required to show two rows and paging.

skoofy5_1-1627098920437.png

 

skoofy5
Advocate IV
Advocate IV

Any way around this @HemantG?

HemantG
Power Apps
Power Apps

HemantG_0-1627413067576.png

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  

No luck unfortunately, which I guess means there's no way around this at the moment.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,094)