Changeset 241144 for blocksy/2.0.65/static/js/options/OptionsRoot.js
- Timestamp:
- 09/05/2024 04:50:55 PM (15 months ago)
- Location:
- blocksy/2.0.65
- Files:
-
- 1 edited
- 1 copied
-
. (copied) (copied from blocksy/2.0.64)
-
static/js/options/OptionsRoot.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
blocksy/2.0.65/static/js/options/OptionsRoot.js
r140616 r241144 6 6 useCallback, 7 7 useEffect, 8 useState 8 useState, 9 9 } from '@wordpress/element' 10 import OptionsPanel from './OptionsPanel .js'10 import OptionsPanel from './OptionsPanel' 11 11 import $ from 'jquery' 12 12 … … 20 20 input_name, 21 21 input_id, 22 hasRevertButton 22 hasRevertButton, 23 23 }) => { 24 24 const [internalValue, setInternalValue] = useState(value) … … 28 28 const handleChange = useCallback(({ id, value, input: inputRef }) => { 29 29 if (inputRef === input.current) { 30 setInternalValue( internalValue=> ({30 setInternalValue((internalValue) => ({ 31 31 ...internalValue, 32 [id]: value 32 [id]: value, 33 33 })) 34 34 } … … 59 59 hasRevertButton={hasRevertButton} 60 60 onChange={(key, newValue) => { 61 setInternalValue( internalValue=> ({61 setInternalValue((internalValue) => ({ 62 62 ...internalValue, 63 [key]: newValue 63 [key]: newValue, 64 64 })) 65 65 $(input.current).change()
Note: See TracChangeset
for help on using the changeset viewer.