Comments (5)
This is by design, but I'm not sure the developer experience is correct. Basically, id
says, this is a significant component that should retain its state across re-renders. But, it's not intuitive, perhaps we should have an attribute that indicates this? maybe persistent=true
?
from components.
Hmm, emphemereal=true might be a good option.
I think not persisting the state can lead to bad UX.
Is there a use case for not setting id on tonic-input ?
Cleaning the end users text upon reRender is a bad experience.
from components.
My suggested solution would be to add a check for props.id in the render method of tonic-input and throw an exception if itβs missing
from components.
Some inputs are optional, their values don't need to be remembered, but that might be the unimportant case. So we are saying we should just remember a component's state by default. I think that's pretty reasonable actually.
from components.
This is not possible to implement.
We can either :
- do the current behavior of only persisting state for Tonic components that have an
id
field - Or add a new gaurd in the
render()
method of some components liketonic-input
that make theid
field mandatory and force developers to set it.
from components.
Related Issues (20)
- add attribute to control render before show
- create a scrollable component
- Add a way to force close a tonic-split HOT 1
- Migrate to ESM HOT 1
- Template string not working in component attribute HOT 4
- Issue reRendering the TonicChart component HOT 2
- TonicRouter seems to have issues working with hash fragments
- how to run tests? HOT 1
- Checkbox click issue
- Tonic-Inline-Toaster appropriates image content and positions it as if it belonged to it's own icon
- issue calling reRender on button
- Calling `reRender()` from an event handler has suprising behavior HOT 1
- Set up GitHub actions as CI HOT 3
- Support inline tonic-dialog HOT 2
- Refactor `windowed` to use a backing array interface HOT 3
- popover should be hidden on window resize
- Version badge on docs outdated
- Tonic dialog is not re render safe HOT 1
- Windowed: Allow text selection for the rows. HOT 1
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.
from components.