Skip to content
This repository has been archived by the owner on Jul 30, 2018. It is now read-only.

Support default properties #621

Open
agubler opened this issue Jul 26, 2017 · 5 comments
Open

Support default properties #621

agubler opened this issue Jul 26, 2017 · 5 comments

Comments

@agubler
Copy link
Member

agubler commented Jul 26, 2017

Enhancement

It could be useful for a widget author to be able to specify default properties that the consumer properties are mixed over ensuring that the this.properties type guard reflects the defaulted properties so that they are not assumed to be possibly undefined.

@kitsonk kitsonk added the beta3 label Jul 28, 2017
@kitsonk kitsonk added this to the 2017.08 milestone Jul 28, 2017
@pottedmeat
Copy link
Contributor

This could be helpful for the dgrid editing functionality where there is a set of properties that should be used across all instances - things like length, style, etc. - but each row has its own value.

@agubler
Copy link
Member Author

agubler commented Aug 17, 2017

@pottedmeat unfortunately it's very difficult to provide the mechanism and support all the typings effectively at the moment.

@pottedmeat
Copy link
Contributor

That's fine, I was just outlining a use case.

@agubler
Copy link
Member Author

agubler commented Aug 17, 2017

Of course, I think there are multiple use cases for default properties one of which is dgrid. Just wanted to let you know where I had got with trying to implement the feature... it led me down a rabbit hole of typings that I couldn't get quite right unfortunately.

@kitsonk
Copy link
Member

kitsonk commented Aug 29, 2017

This seems to be related: microsoft/TypeScript#16173

There appears to still be some challenges, though it seems like the problem space is better understood. We should think about it and try to make sure we have sufficient issues on TypeScript to help solve the problem (or support already existing ones).

@kitsonk kitsonk modified the milestones: 2017.08, 2017.09 Sep 4, 2017
@dylans dylans modified the milestones: 2017.09, 2017.10 Oct 10, 2017
@kitsonk kitsonk removed the beta3 label Oct 30, 2017
@kitsonk kitsonk removed this from the 2017.10 milestone Oct 30, 2017
@kitsonk kitsonk added this to the rc.1 milestone Oct 30, 2017
@kitsonk kitsonk modified the milestones: rc.1, rc.2 Dec 11, 2017
@kitsonk kitsonk added rc2 and removed rc labels Dec 11, 2017
@agubler agubler added external and removed rc2 labels Jan 26, 2018
@agubler agubler removed this from the rc.2 milestone Jan 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants