'Reset' action in ScriptableObject context menu remove 'name' field of this instance. How can I save the value of this or other field on 'Reset' action?

Hi, all! I need your help!)
This is my simple script:

[CreateAssetMenu(fileName = "TestAsset", menuName = "TestAsset")]
public class Test : ScriptableObject { }

And these images demonstrates what I do:

91260-reset.png

I solved this problem. This is my solution:

[CreateAssetMenu(fileName = "TestAsset", menuName = "TestAsset")]
 public class Test : ScriptableObject
{
    public Type field;

#if UNITY_EDITOR

    private Type m_FieldReset;

    protected virtual void Reset()
    {
        name = System.IO.Path.GetFileNameWithoutExtension(UnityEditor.AssetDatabase.GetAssetPath(GetInstanceID()));
        field = m_FieldReset;
    }

    protected virtual void OnValidate()
    {
        m_FieldReset = field;
    }

#endif
}