mirror of
https://github.com/IgnatZakalinsky/home-works.git
synced 2025-12-18 04:39:24 +00:00
final ref hw6 / fix id
This commit is contained in:
@@ -34,7 +34,8 @@ const HW6 = () => {
|
|||||||
value={value}
|
value={value}
|
||||||
onChangeText={setValue}
|
onChangeText={setValue}
|
||||||
spanProps={{
|
spanProps={{
|
||||||
defaultText: 'enter text...'
|
id: 'hw6-editable-span',
|
||||||
|
defaultText: 'enter text...',
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ type SuperEditableSpanType = Omit<DefaultInputPropsType, 'type'> & {
|
|||||||
|
|
||||||
const SuperEditableSpan: React.FC<SuperEditableSpanType> = (
|
const SuperEditableSpan: React.FC<SuperEditableSpanType> = (
|
||||||
{
|
{
|
||||||
id,
|
|
||||||
autoFocus,
|
autoFocus,
|
||||||
onBlur,
|
onBlur,
|
||||||
onEnter,
|
onEnter,
|
||||||
@@ -66,7 +65,6 @@ const SuperEditableSpan: React.FC<SuperEditableSpanType> = (
|
|||||||
<>
|
<>
|
||||||
{editMode ? (
|
{editMode ? (
|
||||||
<SuperInputText
|
<SuperInputText
|
||||||
id={id}
|
|
||||||
autoFocus={autoFocus || true}
|
autoFocus={autoFocus || true}
|
||||||
onBlur={onBlurCallback}
|
onBlur={onBlurCallback}
|
||||||
onEnter={onEnterCallback}
|
onEnter={onEnterCallback}
|
||||||
@@ -81,7 +79,6 @@ const SuperEditableSpan: React.FC<SuperEditableSpanType> = (
|
|||||||
alt={'edit'}
|
alt={'edit'}
|
||||||
/>
|
/>
|
||||||
<span
|
<span
|
||||||
id={id ? id + '-span' : undefined}
|
|
||||||
onDoubleClick={onDoubleClickCallBack}
|
onDoubleClick={onDoubleClickCallBack}
|
||||||
className={spanClassName}
|
className={spanClassName}
|
||||||
{...restSpanProps}
|
{...restSpanProps}
|
||||||
|
|||||||
Reference in New Issue
Block a user