web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Min dataset height?
Power Apps
Unanswered

Min dataset height?

(1) ShareShare
ReportReport
Posted on by 482

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

 

I have the same question (0)
  • Diana Birkelbach Profile Picture
    3,072 Most Valuable Professional on at

    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

  • cchannon Profile Picture
    4,702 Moderator on at

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

    cchannon_0-1627073358335.png

     

  • skoofy5 Profile Picture
    482 on at

    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 Profile Picture
    482 on at

    Any way around this @HemantG?

  • Hemant Gaur Profile Picture
    on at

    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  

  • skoofy5 Profile Picture
    482 on at

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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard