Skip to Content

media query and changing properties

Hello community, i have a little problem, i have this table

<Panel id="panel-id">
<FlexBox 	alignItems="Start"
			justifyContent="Center">
		<items>
			<Table 	 id="tabla"
					 items="{ path : '/MaterialListSet' }" 
					 fixedLayout="false"
					 popinLayout="Block">
			<columns>
				<Column width="12em">
					<Text text="Material" />
				</Column>
				<Column width="8em"
						minScreenWidth="Tablet"
						demandPopin="true">
					<Text text="Responsable" />
				</Column>
				<Column width="8em"
						minScreenWidth="Desktop"
						demandPopin="true">
					<Text text="Ult. Modif" />
				</Column>
				<Column width="8em"
						minScreenWidth="Desktop"
						demandPopin="true">
					<Text text="Tipo de Material" />
				</Column>
				<Column width="8em">
					<Text text="Grupo de Material" />
				</Column>
			</columns>
			
			
			<items>
			
				<ColumnListItem>
					<cells>
						<ObjectIdentifier
							text="{MATERIAL}"/>
						<Text
							text="{RESPONSABLE}" />
						<Text
							text="{ULT_MODIF}" />
						<Text text="{MTYPE}" />
						<ObjectNumber
								number="{GP_ART}" />
					</cells>
				</ColumnListItem>
			
			</items>
			
			</Table>
		</items>
	</FlexBox>
</Panel>

so my table has the propertie fixedLayout="false" how can i do to change it to true when my screen is max-width 991px for example. thanks if you have some doc please let me know

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Mar 06 at 05:51 PM

    Hello Naoto Amari

    As you can see i dont have allot to do to day.
    You can do something like this in the onInit function

    var isBigScreen = window.innerWidth >= 991;

    this.getView().byId('tabla').setFixedLayout(isBigScreen)
    Add comment
    10|10000 characters needed characters exceeded