2
0
mirror of https://github.com/lowdefy/lowdefy.git synced 2025-04-24 16:00:53 +08:00

feat: added SetFocus Action

This commit is contained in:
Machiel 2024-03-15 11:47:39 +02:00
parent 8bd2b2f50b
commit 42ed0d742e
2 changed files with 22 additions and 0 deletions
packages/plugins/actions/actions-core/src

@ -26,6 +26,7 @@ export { default as Request } from './actions/Request.js';
export { default as Reset } from './actions/Reset.js';
export { default as ResetValidation } from './actions/ResetValidation.js';
export { default as ScrollTo } from './actions/ScrollTo.js';
export { default as SetFocus } from './actions/SetFocus.js';
export { default as SetGlobal } from './actions/SetGlobal.js';
export { default as SetState } from './actions/SetState.js';
export { default as Throw } from './actions/Throw.js';

@ -0,0 +1,21 @@
/*
Copyright 2020-2024 Lowdefy, Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
function SetFocus({ params }) {
document.getElementById(params).focus();
}
export default SetFocus;