mirror of
https://github.com/IgnatZakalinsky/home-works.git
synced 2025-12-16 20:39:24 +00:00
final ref hw6 / fix id
This commit is contained in:
@@ -34,7 +34,8 @@ const HW6 = () => {
|
||||
value={value}
|
||||
onChangeText={setValue}
|
||||
spanProps={{
|
||||
defaultText: 'enter text...'
|
||||
id: 'hw6-editable-span',
|
||||
defaultText: 'enter text...',
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user