Simple Solution for Conditional Rendering on Width

  • 3
  • Idea
  • Updated 1 year ago
  • Under Consideration
  • (Edited)
Skuid, please implement this as declarative.

(function(skuid){
	var $ = skuid.$;
	$(document.body).one('pageload',function(){
		var ADashUIOnly = skuid.$M('ADashUIOnly'),
		    row = ADashUIOnly.getFirstRow();
		
		window.addEventListener("resize", setWidth);
		
		function setWidth(){
		    ADashUIOnly.updateRow(row,'minWidth',$(window).width());
		}
	});
})(skuid);

Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb

Posted 1 year ago

  • 3
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
slick.
Photo of Don Souza

Don Souza, Employee

  • 1,160 Points 1k badge 2x thumb
Good idea.
Photo of Jackson Alexander

Jackson Alexander, Director, Product Experience

  • 400 Points 250 badge 2x thumb
Agreed. Good idea.