Make it so that item sheet rerenders maintain focus on what you were editing
This commit is contained in:
parent
db5dfc3234
commit
afc8278ffc
6 changed files with 16 additions and 13 deletions
|
|
@ -1,10 +1,8 @@
|
|||
import { localizer } from "../../utils/Localizer.mjs";
|
||||
|
||||
const { randomID } = foundry.utils;
|
||||
|
||||
export function booleanInput(input, data) {
|
||||
const label = localizer(input.label);
|
||||
const id = `${data.meta.idp}-${randomID(10)}`;
|
||||
const id = `${data.meta.idp}-${input.id}`;
|
||||
|
||||
if (data.meta.limited) {
|
||||
return `<div data-input-type="boolean">
|
||||
|
|
|
|||
|
|
@ -1,11 +1,9 @@
|
|||
import { localizer } from "../../utils/Localizer.mjs";
|
||||
import { options } from "../options.mjs";
|
||||
|
||||
const { randomID } = foundry.utils;
|
||||
|
||||
export function dropdownInput(input, data) {
|
||||
const label = localizer(input.label);
|
||||
const id = `${data.meta.idp}-${randomID(10)}`;
|
||||
const id = `${data.meta.idp}-${input.id}`;
|
||||
|
||||
if (!data.meta.editable) {
|
||||
return `<div data-input-type="dropdown">
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
import { localizer } from "../../utils/Localizer.mjs";
|
||||
|
||||
const { randomID } = foundry.utils;
|
||||
|
||||
export function numberInput(input, data) {
|
||||
const label = localizer(input.label);
|
||||
const id = `${data.meta.idp}-${randomID(10)}`;
|
||||
const id = `${data.meta.idp}-${input.id}`;
|
||||
|
||||
if (!data.meta.editable) {
|
||||
return `<div data-input-type="integer">
|
||||
|
|
|
|||
|
|
@ -1,11 +1,9 @@
|
|||
import { localizer } from "../../utils/Localizer.mjs";
|
||||
|
||||
const { randomID } = foundry.utils;
|
||||
|
||||
export function stringSet(input, data) {
|
||||
const label = localizer(input.label);
|
||||
const placeholder = localizer(input.placeholder ?? ``);
|
||||
const id = `${data.meta.idp}-${randomID(10)}`;
|
||||
const id = `${data.meta.idp}-${input.id}`;
|
||||
|
||||
if (!data.meta.editable) {
|
||||
const tagList = input.value
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue