contact-app's People
contact-app's Issues
Issues that need fixing
Bugs
- After editing a contact you cannot create another one, name input remains disabled
- Wrong spelling for
contactTablKeys
https://github.com/shosenwales/contact-app/blob/master/script.js#L159 - Here you're assuming that the button element would be clicked, but you have an
i
element for your button. If thei
element is clicked then your code will fail to run
https://github.com/shosenwales/contact-app/blob/master/script.js#L128
Solutions- Use Element.closest :
$event.target.closest(".row").querySelector(".name")
- You can use data-attributes to store the name on both the
i
and thebutton
- Use Element.closest :
Observations
- Make it possible for the name to be edited
- Properly indent your code so it'll be easy to read through
- You should use
const
for variables that does not change. All your functions should beconst
too - You should not put block elements in span elements here https://www.codementor.io/afuggini/block-vs-inline-elements-in-html-what-they-are-and-why-you-should-understand-them-fo7jcqwg3
- You should not use divs as buttons
- Use
.innerText
or.textContent
instead ofinnerHTML
when setting just text into elements. - Definitions like this should be at the top of the file https://github.com/shosenwales/contact-app/blob/master/script.js#L83
- You did checks here. Provide feed back to the user
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.