Hi,
Currently I have Main Block and task block.In Task block I have a Form and inside that form we are using custom date component. and that task block is used in Main block inside Side Bar.
So I am using Shortcut Reactive component to trigger the action using short cut .
I want to Open the Task Side bar which is inside Main Container using shortcut and set the focus on that custom date component .I cannot set focus on Date component as its is inside task block and that task block is used in side bar of Main block .
Help me to set set focus on Date component of that side without javascript everytime i open the side using shortcut and hoe to get the widget id of that date component. and also reset the focus back so that if i close and again open side bar it should set the focus again
Please find attached the OML.
Halloe @Buddy_Outsystemsfirst you need to set ShouldSetFocus parameter to tasks block second add input parameter to
Hi @Kerollos Adel
I have did the change I am able to set focus.
I have query as my date component consists of three block are we able to set focus on container as I want to treat that container as whole.
I have tried using Data.Id but it wont set.
Is there any way?
Thanks,
Yash
Hello buddy,
In HTML, <div> elements themselves don't have a native focus behavior like form inputs, but you can make them focusable by adding a tabindex attribute. This attribute allows non-focusable elements to receive focus.
<div id="main-div" tabindex="0">
or in OS
tabindex="0" makes the container focusable by keyboard navigation (eg, using the Tab key).
document.getElementById('inputsContainer').focus() programmatically sets the focus on the container.
I hope this helps,
bye bye