final ref hw6 / fix id

This commit is contained in:
neko
2022-09-20 13:25:03 +03:00
parent 5efc1d9d37
commit 5cfe39b00c
2 changed files with 2 additions and 4 deletions

View File

@@ -34,7 +34,8 @@ const HW6 = () => {
value={value}
onChangeText={setValue}
spanProps={{
defaultText: 'enter text...'
id: 'hw6-editable-span',
defaultText: 'enter text...',
}}
/>
</div>

View File

@@ -28,7 +28,6 @@ type SuperEditableSpanType = Omit<DefaultInputPropsType, 'type'> & {
const SuperEditableSpan: React.FC<SuperEditableSpanType> = (
{
id,
autoFocus,
onBlur,
onEnter,
@@ -66,7 +65,6 @@ const SuperEditableSpan: React.FC<SuperEditableSpanType> = (
<>
{editMode ? (
<SuperInputText
id={id}
autoFocus={autoFocus || true}
onBlur={onBlurCallback}
onEnter={onEnterCallback}
@@ -81,7 +79,6 @@ const SuperEditableSpan: React.FC<SuperEditableSpanType> = (
alt={'edit'}
/>
<span
id={id ? id + '-span' : undefined}
onDoubleClick={onDoubleClickCallBack}
className={spanClassName}
{...restSpanProps}