Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

bryantownsend
New Contributor

Mashup Table resize issues

I have a simple mashup that contains a filter panel, and a table. I cannot get the table object to resize dynamically based on the selections in the filter panel. For example, based on the selections, if the table return 10 rows, I was to display all 10 rows. If the table returns 100 row, I want to display all 100 rows without scrolling. Currently my table only shows the title. I'm not sure if this is an issue with the div tag, the qlik.resize() feature, or both. Any thoughts on how I can accomplish this?

HTML:

<body style="overflow: auto">

<div id="QV00" class="qvfilterobject"></div>

<div style="border:1px solid black" id="QV01"></div>

js script:

var prefix = window.location.pathname.substr( 0, window.location.pathname.toLowerCase().lastIndexOf( "/extensions" ) + 1 );
var config = {
host: window.location.hostname,
prefix: prefix,
port: window.location.port,
isSecure: window.location.protocol === "https:"
};
require.config( {
baseUrl: ( config.isSecure ? "https://" : "http://" ) + config.host + (config.port ? ":" + config.port : "") + config.prefix + "resources"
} );

require( ["js/qlik"], function ( qlik ) {
qlik.setOnError( function ( error ) {
  $( '#popupText' ).append( error.message + "<br>" );
  $( '#popup' ).fadeIn( 1000 );
} );
$( "#closePopup" ).click( function () {
  $( '#popup' ).hide();
} );
//open apps -- inserted here --
var app = qlik.openApp('eb29e091-65ad-475e-a864-553bbf634d38', config);

//get objects -- inserted here --
app.getObject('QV00','1222ac6a-f88c-44d3-b1f4-e2547b001c45');
app.getObject('QV01','TcDzGsS').then(function(vis) {qlik.resize('FpUgm');});

} );

3 Replies
erik_wetterberg
Valued Contributor III

Re: Mashup Table resize issues

‌Hi Bryan,

You need to set a height on the div element before showing the Qlik Sense table. Probably using the visualization Api is the best way:

* use the get method to fetch the table

* check how many rows it has, and set the height

* use the show method to inject the table

Erik Wetterberg

https://extendingqlik.upper88.com/

Erik Wetterberg
https://extendingqlik.upper88.com/
bryantownsend
New Contributor

Re: Mashup Table resize issues

Erik I appreciate the direction. Unfortunately, I'm new to this, and would probably need a code example or a little more detail on how to accomplish this....Thanks.

bryantownsend
New Contributor

Re: Mashup Table resize issues

I have not had any luck with this. Does anyone know how to get the row count of a table object in a Mashup? If I can get that value, I may be able to set the div height based on that.