added 'increment' option for Inputter (#64)

* added 'increment' option for Inputter

* added 'quick edit: added max value for font-weight

* forgot to include type change
This commit is contained in:
matavach
2024-08-02 21:54:25 -05:00
committed by GitHub
parent 308e22b02f
commit 1f7c5a70ca
3 changed files with 4 additions and 2 deletions

View File

@@ -32,6 +32,7 @@ export const Inputter = <T>({
enums,
max = 1000000,
min = 0,
increment = 1
}: RowProps<T>,
className: string
) => {
@@ -43,7 +44,7 @@ export const Inputter = <T>({
case "number": return self.child = Widget.SpinButton({
setup(self) {
self.set_range(min, max)
self.set_increments(1, 5)
self.set_increments(1 * increment, 5 * increment)
self.on("value-changed", () => opt.value = self.value as T)
self.hook(opt, () => self.value = opt.value as number)
},